aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/arp.c6
-rw-r--r--net/ipv4/ipmr.c3
-rw-r--r--net/ipv4/udp.c6
3 files changed, 8 insertions, 7 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 6e747065c202..80769f1f9fab 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -661,13 +661,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
661#endif 661#endif
662#endif 662#endif
663 663
664#ifdef CONFIG_FDDI 664#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE)
665 case ARPHRD_FDDI: 665 case ARPHRD_FDDI:
666 arp->ar_hrd = htons(ARPHRD_ETHER); 666 arp->ar_hrd = htons(ARPHRD_ETHER);
667 arp->ar_pro = htons(ETH_P_IP); 667 arp->ar_pro = htons(ETH_P_IP);
668 break; 668 break;
669#endif 669#endif
670#ifdef CONFIG_TR 670#if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)
671 case ARPHRD_IEEE802_TR: 671 case ARPHRD_IEEE802_TR:
672 arp->ar_hrd = htons(ARPHRD_IEEE802); 672 arp->ar_hrd = htons(ARPHRD_IEEE802);
673 arp->ar_pro = htons(ETH_P_IP); 673 arp->ar_pro = htons(ETH_P_IP);
@@ -1051,7 +1051,7 @@ static int arp_req_set(struct net *net, struct arpreq *r,
1051 return -EINVAL; 1051 return -EINVAL;
1052 } 1052 }
1053 switch (dev->type) { 1053 switch (dev->type) {
1054#ifdef CONFIG_FDDI 1054#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE)
1055 case ARPHRD_FDDI: 1055 case ARPHRD_FDDI:
1056 /* 1056 /*
1057 * According to RFC 1390, FDDI devices should accept ARP 1057 * According to RFC 1390, FDDI devices should accept ARP
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index f3f1c6b5c70c..7a7ee1cc3b5a 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -998,7 +998,8 @@ ipmr_cache_unresolved(struct mr_table *mrt, vifi_t vifi, struct sk_buff *skb)
998 atomic_inc(&mrt->cache_resolve_queue_len); 998 atomic_inc(&mrt->cache_resolve_queue_len);
999 list_add(&c->list, &mrt->mfc_unres_queue); 999 list_add(&c->list, &mrt->mfc_unres_queue);
1000 1000
1001 mod_timer(&mrt->ipmr_expire_timer, c->mfc_un.unres.expires); 1001 if (atomic_read(&mrt->cache_resolve_queue_len) == 1)
1002 mod_timer(&mrt->ipmr_expire_timer, c->mfc_un.unres.expires);
1002 } 1003 }
1003 1004
1004 /* 1005 /*
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 4560b291180b..f3e00c5cd1ed 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1536,6 +1536,9 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
1536 1536
1537 uh = udp_hdr(skb); 1537 uh = udp_hdr(skb);
1538 ulen = ntohs(uh->len); 1538 ulen = ntohs(uh->len);
1539 saddr = ip_hdr(skb)->saddr;
1540 daddr = ip_hdr(skb)->daddr;
1541
1539 if (ulen > skb->len) 1542 if (ulen > skb->len)
1540 goto short_packet; 1543 goto short_packet;
1541 1544
@@ -1549,9 +1552,6 @@ int __udp4_lib_rcv(struct sk_buff *skb, struct udp_table *udptable,
1549 if (udp4_csum_init(skb, uh, proto)) 1552 if (udp4_csum_init(skb, uh, proto))
1550 goto csum_error; 1553 goto csum_error;
1551 1554
1552 saddr = ip_hdr(skb)->saddr;
1553 daddr = ip_hdr(skb)->daddr;
1554
1555 if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) 1555 if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST))
1556 return __udp4_lib_mcast_deliver(net, skb, uh, 1556 return __udp4_lib_mcast_deliver(net, skb, uh,
1557 saddr, daddr, udptable); 1557 saddr, daddr, udptable);