summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/ipoe/ipoe.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2017-04-04 12:44:16 +0300
committerDmitry Kozlov <xeb@mail.ru>2017-04-04 12:44:20 +0300
commit29e80de7214199500b56e4ac3a667a40df1a7f20 (patch)
tree94ae87f10806f0dd1920cc10f6d98d1ba6b554af /accel-pppd/ctrl/ipoe/ipoe.c
parent974f6a33e3983880051470d1676745fd136f5d61 (diff)
downloadaccel-ppp-xebd-29e80de7214199500b56e4ac3a667a40df1a7f20.tar.gz
accel-ppp-xebd-29e80de7214199500b56e4ac3a667a40df1a7f20.zip
ipoe: included lua bitop library
Included bitop library http://bitop.luajit.org/index.html It may be used to extract vlan components in username function: function username(ses) vid=ses:vlan() svid=bit.rshift(vid,16) cvid=bit.band(vid,0xffff) ... end
Diffstat (limited to 'accel-pppd/ctrl/ipoe/ipoe.c')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 62c06f0..b8aba6c 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -2893,6 +2893,7 @@ static void add_interface(const char *ifname, int ifindex, const char *opt, int
serv->opt_lua_username_func = opt_lua_username_func;
#endif
serv->parent_ifindex = parent_ifindex;
+ serv->parent_vid = parent_ifindex ? iplink_vlan_get_vid(parent_ifindex, NULL) : 0;
serv->vid = vid;
serv->active = 1;
INIT_LIST_HEAD(&serv->sessions);