This patch adds a multilink_join_hook for plugins to hear about new interfaces added to a multilink bundle. Signed-off-by: James Chapman Index: ppp-2.4.4/pppd/auth.c =================================================================== --- ppp-2.4.4.orig/pppd/auth.c +++ ppp-2.4.4/pppd/auth.c @@ -195,6 +195,11 @@ int (*null_auth_hook) __P((struct wordli int (*allowed_address_hook) __P((u_int32_t addr)) = NULL; +#ifdef HAVE_MULTILINK +/* Hook for plugin to hear when an interface joins a multilink bundle */ +void (*multilink_join_hook) __P((void)) = NULL; +#endif + /* A notifier for when the peer has authenticated itself, and we are proceeding to the network phase. */ struct notifier *auth_up_notifier = NULL; @@ -853,6 +858,9 @@ start_networks(unit) #ifdef HAVE_MULTILINK if (multilink) { if (mp_join_bundle()) { + if (multilink_join_hook) { + (*multilink_join_hook)(); + } if (updetach && !nodetach) detach(); return; Index: ppp-2.4.4/pppd/pppd.h =================================================================== --- ppp-2.4.4.orig/pppd/pppd.h +++ ppp-2.4.4/pppd/pppd.h @@ -714,6 +714,7 @@ extern void (*ip_choose_hook) __P((u_int extern int (*chap_check_hook) __P((void)); extern int (*chap_passwd_hook) __P((char *user, char *passwd)); +extern void (*multilink_join_hook) __P((void)); /* Let a plugin snoop sent and received packets. Useful for L2TP */ extern void (*snoop_recv_hook) __P((unsigned char *p, int len));