diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-04-04 23:44:14 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-04-04 23:44:14 +0300 |
commit | b727c912fefac09b0cd6d189eefca89d8a59ceae (patch) | |
tree | af4797893239005baa5f7a4988f47626e8d9d297 /drivers | |
parent | 1721713a70dce5969357ba5d868270fda51ade03 (diff) | |
download | accel-ppp-b727c912fefac09b0cd6d189eefca89d8a59ceae.tar.gz accel-ppp-b727c912fefac09b0cd6d189eefca89d8a59ceae.zip |
ipoe_mod: restored ip-mac binding function
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ipoe/ipoe.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index 5300d642..6e5b0b53 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -704,7 +704,7 @@ static rx_handler_result_t ipoe_recv(struct sk_buff **pskb) struct ipoe_session *ses = NULL; struct iphdr *iph = NULL; struct _arphdr *arph = NULL; - struct ethhdr *eth; + struct ethhdr *eth = eth_hdr(skb); int noff; struct net_device_stats *stats; __be32 saddr; @@ -783,16 +783,15 @@ static rx_handler_result_t ipoe_recv(struct sk_buff **pskb) stats = &ses->dev->stats; - /*if (ses->link_dev) { - eth = eth_hdr(skb); + if (ses->gw) + memcpy(ses->hwaddr, eth->h_source, ETH_ALEN); + else { if (memcmp(eth->h_source, ses->hwaddr, ETH_ALEN)) { stats->rx_dropped++; kfree_skb(skb); return RX_HANDLER_CONSUMED; } - }*/ - eth = eth_hdr(skb); - memcpy(ses->hwaddr, eth->h_source, ETH_ALEN); + } if (ses->addr > 1 && ipoe_do_nat(skb, ses->addr, 0)) goto drop; |