diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2016-03-10 11:05:55 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2016-03-10 11:05:55 +0300 |
commit | 89c8abc72353d55bea891e0f386a34c63425fa70 (patch) | |
tree | deecc2f5a5be7c4c7c548078aa2b13c18a0fc72a | |
parent | 14780ff57d994a324de6e7de888381358ec7238f (diff) | |
download | accel-ppp-89c8abc72353d55bea891e0f386a34c63425fa70.tar.gz accel-ppp-89c8abc72353d55bea891e0f386a34c63425fa70.zip |
ipoe_mod: partially revert 14780ff57d994a324de6e7de888381358ec7238f
Virtual ipoe interfaces can not be used to attach wide routes, only routes behind client ip (gateway)
-rw-r--r-- | drivers/ipoe/ipoe.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/drivers/ipoe/ipoe.c b/drivers/ipoe/ipoe.c index bc6796a..260df5e 100644 --- a/drivers/ipoe/ipoe.c +++ b/drivers/ipoe/ipoe.c @@ -489,28 +489,13 @@ static netdev_tx_t ipoe_xmit(struct sk_buff *skb, struct net_device *dev) ip_local_out(skb); return NETDEV_TX_OK; - } - } /*else if (skb->protocol == htons(ETH_P_ARP)) { - if (!pskb_may_pull(skb, arp_hdr_len(dev) + noff)) - goto drop; + } else { + struct ethhdr *eth = (struct ethhdr *)skb->data; - arp = arp_hdr(skb); - arp_ptr = (unsigned char *)(arp + 1); - - if (arp->ar_op == htons(ARPOP_REQUEST)) { - memcpy(&tip, arp_ptr + ETH_ALEN + 4 + ETH_ALEN, 4); - if (tip == ses->addr) { - if (skb_cloned(skb) && - !skb_clone_writable(skb, arp_hdr_len(dev) + noff) && - pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) - goto drop; - - arp = arp_hdr(skb); - arp_ptr = (unsigned char *)(arp + 1); - memcpy(arp_ptr + ETH_ALEN + 4 + ETH_ALEN, &ses->peer_addr, 4); - } + memcpy(eth->h_dest, ses->hwaddr, ETH_ALEN); + memcpy(eth->h_source, ses->link_dev->dev_addr, ETH_ALEN); } - }*/ + } if (ses->link_dev) { cb_ptr = skb->cb + sizeof(skb->cb) - 2; |