From 350721efcaeca909054cf92ea9e1dbd38ad689b4 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 5 Apr 2016 10:48:01 +0300 Subject: ipoe_mod: code simplification --- drivers/ipoe/ipoe.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'drivers') 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; -- cgit v1.2.3