patch-1.3.78 linux/net/ipv4/ip_input.c
Next file: linux/net/ipv4/proc.c
Previous file: linux/net/ipv4/ip_fragment.c
Back to the patch index
Back to the overall index
- Lines: 36
- Date:
Mon Mar 25 08:58:25 1996
- Orig file:
v1.3.77/linux/net/ipv4/ip_input.c
- Orig date:
Fri Feb 9 17:53:11 1996
diff -u --recursive --new-file v1.3.77/linux/net/ipv4/ip_input.c linux/net/ipv4/ip_input.c
@@ -260,6 +260,17 @@
skb_trim(skb,ntohs(iph->tot_len));
+ /*
+ * Try to select closest <src,dst> alias device, if any.
+ * net_alias_dev_rcv_sel32 returns main device if it
+ * fails to found other.
+ */
+
+#ifdef CONFIG_NET_ALIAS
+ if (iph->daddr != skb->dev->pa_addr && net_alias_has(skb->dev))
+ skb->dev = dev = net_alias_dev_rcv_sel32(skb->dev, AF_INET, iph->saddr, iph->daddr);
+#endif
+
if (iph->ihl > 5)
{
skb->ip_summed = 0;
@@ -275,17 +286,6 @@
#endif
}
- /*
- * Try to select closest <src,dst> alias device, if any.
- * net_alias_dev_rcv_sel32 returns main device if it
- * fails to found other.
- */
-
-#ifdef CONFIG_NET_ALIAS
- if (iph->daddr != skb->dev->pa_addr && net_alias_has(skb->dev))
- skb->dev = dev = net_alias_dev_rcv_sel32(skb->dev, AF_INET, iph->saddr, iph->daddr);
-#endif
-
/*
* Account for the packet (even if the packet is
* not accepted by the firewall!).
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this