vlan_dev.c (cfd72a4c2089aa3938f37281a34d6eb3306d5fd8) vlan_dev.c (07fc67befd2e843da8ad01785d559d9c257d7fd4)
1/* -*- linux-c -*-
2 * INET 802.1Q VLAN
3 * Ethernet-type device handling.
4 *
5 * Authors: Ben Greear <greearb@candelatech.com>
6 * Please send support related email to: netdev@vger.kernel.org
7 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
8 *

--- 47 unchanged lines hidden (view full) ---

56
57 /* TODO: Confirm this will work with VLAN headers... */
58 return arp_find(veth->h_dest, skb);
59#endif
60 default:
61 pr_debug("%s: unable to resolve type %X addresses\n",
62 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
63
1/* -*- linux-c -*-
2 * INET 802.1Q VLAN
3 * Ethernet-type device handling.
4 *
5 * Authors: Ben Greear <greearb@candelatech.com>
6 * Please send support related email to: netdev@vger.kernel.org
7 * VLAN Home Page: http://www.candelatech.com/~greear/vlan.html
8 *

--- 47 unchanged lines hidden (view full) ---

56
57 /* TODO: Confirm this will work with VLAN headers... */
58 return arp_find(veth->h_dest, skb);
59#endif
60 default:
61 pr_debug("%s: unable to resolve type %X addresses\n",
62 dev->name, ntohs(veth->h_vlan_encapsulated_proto));
63
64 memcpy(veth->h_source, dev->dev_addr, ETH_ALEN);
64 ether_addr_copy(veth->h_source, dev->dev_addr);
65 break;
66 }
67
68 return 0;
69}
70
71/*
72 * Create the VLAN header for an arbitrary protocol layer

--- 225 unchanged lines hidden (view full) ---

298 goto del_unicast;
299 }
300 if (dev->flags & IFF_PROMISC) {
301 err = dev_set_promiscuity(real_dev, 1);
302 if (err < 0)
303 goto clear_allmulti;
304 }
305
65 break;
66 }
67
68 return 0;
69}
70
71/*
72 * Create the VLAN header for an arbitrary protocol layer

--- 225 unchanged lines hidden (view full) ---

298 goto del_unicast;
299 }
300 if (dev->flags & IFF_PROMISC) {
301 err = dev_set_promiscuity(real_dev, 1);
302 if (err < 0)
303 goto clear_allmulti;
304 }
305
306 memcpy(vlan->real_dev_addr, real_dev->dev_addr, ETH_ALEN);
306 ether_addr_copy(vlan->real_dev_addr, real_dev->dev_addr);
307
308 if (vlan->flags & VLAN_FLAG_GVRP)
309 vlan_gvrp_request_join(dev);
310
311 if (vlan->flags & VLAN_FLAG_MVRP)
312 vlan_mvrp_request_join(dev);
313
314 if (netif_carrier_ok(real_dev))

--- 47 unchanged lines hidden (view full) ---

362 if (err < 0)
363 return err;
364 }
365
366 if (!ether_addr_equal(dev->dev_addr, real_dev->dev_addr))
367 dev_uc_del(real_dev, dev->dev_addr);
368
369out:
307
308 if (vlan->flags & VLAN_FLAG_GVRP)
309 vlan_gvrp_request_join(dev);
310
311 if (vlan->flags & VLAN_FLAG_MVRP)
312 vlan_mvrp_request_join(dev);
313
314 if (netif_carrier_ok(real_dev))

--- 47 unchanged lines hidden (view full) ---

362 if (err < 0)
363 return err;
364 }
365
366 if (!ether_addr_equal(dev->dev_addr, real_dev->dev_addr))
367 dev_uc_del(real_dev, dev->dev_addr);
368
369out:
370 memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
370 ether_addr_copy(dev->dev_addr, addr->sa_data);
371 return 0;
372}
373
374static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
375{
376 struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
377 const struct net_device_ops *ops = real_dev->netdev_ops;
378 struct ifreq ifrr;

--- 424 unchanged lines hidden ---
371 return 0;
372}
373
374static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
375{
376 struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
377 const struct net_device_ops *ops = real_dev->netdev_ops;
378 struct ifreq ifrr;

--- 424 unchanged lines hidden ---