It is currently Wed Apr 26, 2017 2:58 pm

All times are UTC [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: multilink support in 1.8 + pppd 2.4.5 broken
PostPosted: Sun May 06, 2012 5:43 pm 

Joined: Sat Jun 04, 2011 9:18 am
Posts: 15
Hi Guys,

There is a comment in the openl2tp.c file regarding the multilink situation:

* When a multilink interface is created, there are 2 cases to consider.
* 1. The new interface is the first of a multilink bundle (master).
* 2. The new interface is being attached to an existing bundle.
* The first case is handled by existing code because the interface
* generates ip-up events just like standard interfaces. But in the
* second case, where the interface is added to an existing ppp
* bundle, pppd does not do IP negotiation and so as a result, no
* ip-up event is generated when the interface is created. Since
* openl2tpd needs the SESSION_PPP_UPDOWN_IND for all interfaces of a
* PPP bundle, we must fake the event.
* We use the ip_multilink_join_hook to hear when an interface joins a
* multilink bundle.

As it stands, the comment is correct, but the code is wrong:

static void openl2tp_multilink_join_ind(void)
    warn("multilink_join_ind: doing_multilink=%d, multilink_master=%d",
            doing_multilink, multilink_master);
    if (doing_multilink && !multilink_master) {
        /* send event only if not master */
                    pppol2tp_session_id, 1);

You'll note I added a warning. From all my tests whenever the callback gets called both doing_multilink and multilink_master is 0. No clue why, from the multilink.c code it looks like it should be set. What I did note though from auth.c is that the callback will only get called in the case where the above test _should_ be true.

The mp_join_bundle() in multilink.c returns 1 if, and only if we joined an existing ML bundle. In all other cases it returns 0. auth.c calls the hook, if, and only if, mp_join_bundle returns non-zero. So after stripping off the if() statement around the openl2tp_ppp_updown_ind() call everything works as expected.

Information posted for other people experiencing the same problem. You'll note from your logs that your slave pppds keeps getting killed and terminating due to signal 15 after ppp setup timeout time.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group