patch-2.0.31 linux/net/core/dev.c
Next file: linux/net/core/net_alias.c
Previous file: linux/net/bridge/br.c
Back to the patch index
Back to the overall index
- Lines: 62
- Date:
Tue Aug 12 14:15:56 1997
- Orig file:
v2.0.30/linux/net/core/dev.c
- Orig date:
Tue Apr 8 08:47:47 1997
diff -u --recursive --new-file v2.0.30/linux/net/core/dev.c linux/net/core/dev.c
@@ -392,7 +392,7 @@
#ifdef CONFIG_NET_ALIAS
if (net_alias_is(dev))
- skb->dev = dev = net_alias_main_dev(dev);
+ skb->dev = dev = net_alias_dev_tx(dev);
#endif
/*
@@ -436,7 +436,18 @@
struct sk_buff *skb2;
if ((skb2 = skb_clone(skb, GFP_ATOMIC)) == NULL)
break;
+ /* FIXME?: Wrong when the hard_header_len
+ * is an upper bound. Is this even
+ * used anywhere?
+ */
skb2->h.raw = skb2->data + dev->hard_header_len;
+ /* On soft header devices we
+ * yank the header before mac.raw
+ * back off. This is set by
+ * dev->hard_header().
+ */
+ if (dev->flags&IFF_SOFTHEADERS)
+ skb_pull(skb2,skb2->mac.raw-skb2->data);
skb2->mac.raw = skb2->data;
ptype->func(skb2, skb->dev, ptype);
}
@@ -1095,7 +1106,7 @@
switch(getset)
{
case SIOCGIFFLAGS: /* Get interface flags */
- ifr.ifr_flags = dev->flags;
+ ifr.ifr_flags = (dev->flags & ~IFF_SOFTHEADERS);
goto rarok;
case SIOCSIFFLAGS: /* Set interface flags */
@@ -1117,7 +1128,7 @@
IFF_BROADCAST | IFF_DEBUG | IFF_LOOPBACK |
IFF_POINTOPOINT | IFF_NOTRAILERS | IFF_RUNNING |
IFF_NOARP | IFF_PROMISC | IFF_ALLMULTI | IFF_SLAVE | IFF_MASTER
- | IFF_MULTICAST)) | (dev->flags & IFF_UP);
+ | IFF_MULTICAST)) | (dev->flags & (IFF_SOFTHEADERS|IFF_UP));
/*
* Load in the correct multicast list now the flags have changed.
*/
@@ -1427,7 +1438,6 @@
case SIOCGIFMTU:
case SIOCGIFMEM:
case SIOCGIFHWADDR:
- case SIOCSIFHWADDR:
case SIOCGIFSLAVE:
case SIOCGIFMAP:
return dev_ifsioc(arg, cmd);
@@ -1444,6 +1454,7 @@
case SIOCSIFMETRIC:
case SIOCSIFMTU:
case SIOCSIFMEM:
+ case SIOCSIFHWADDR:
case SIOCSIFMAP:
case SIOCSIFSLAVE:
case SIOCADDMULTI:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov