diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-04-05 10:48:01 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-04-05 10:48:01 +0300 |
commit | 350721efcaeca909054cf92ea9e1dbd38ad689b4 (patch) | |
tree | a9ec039bebad430d2ee94e8fa525b17524e5bf4c /drivers/ipoe | |
parent | b48a4fb069dc2853088bc6e80f6acbab97a99256 (diff) | |
download | accel-ppp-350721efcaeca909054cf92ea9e1dbd38ad689b4.tar.gz accel-ppp-350721efcaeca909054cf92ea9e1dbd38ad689b4.zip |
ipoe_mod: code simplification
Diffstat (limited to 'drivers/ipoe')
-rw-r--r-- | drivers/ipoe/ipoe.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index 6e5b0b53..c2ff3ba7 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -785,13 +785,8 @@ static rx_handler_result_t ipoe_recv(struct sk_buff **pskb) 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; - } - } + else if (memcmp(eth->h_source, ses->hwaddr, ETH_ALEN)) + goto drop; if (ses->addr > 1 && ipoe_do_nat(skb, ses->addr, 0)) goto drop; |