diff options
-rw-r--r-- | include/linux/atalk.h | 2 | ||||
-rw-r--r-- | net/core/pktgen.c | 29 | ||||
-rw-r--r-- | net/ipv4/Kconfig | 3 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_ctl.c | 8 | ||||
-rw-r--r-- | net/ipv4/ipvs/ip_vs_sync.c | 4 | ||||
-rw-r--r-- | net/netlink/af_netlink.c | 11 |
6 files changed, 31 insertions, 26 deletions
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index 09a1451c1159..911c09cb9bf9 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_ATALK_H__ | 1 | #ifndef __LINUX_ATALK_H__ |
2 | #define __LINUX_ATALK_H__ | 2 | #define __LINUX_ATALK_H__ |
3 | 3 | ||
4 | #include <asm/byteorder.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | * AppleTalk networking structures | 7 | * AppleTalk networking structures |
6 | * | 8 | * |
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index c57b06bc79f3..975d651312dc 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -151,7 +151,7 @@ | |||
151 | #include <asm/timex.h> | 151 | #include <asm/timex.h> |
152 | 152 | ||
153 | 153 | ||
154 | #define VERSION "pktgen v2.61: Packet Generator for packet performance testing.\n" | 154 | #define VERSION "pktgen v2.62: Packet Generator for packet performance testing.\n" |
155 | 155 | ||
156 | /* #define PG_DEBUG(a) a */ | 156 | /* #define PG_DEBUG(a) a */ |
157 | #define PG_DEBUG(a) | 157 | #define PG_DEBUG(a) |
@@ -1921,6 +1921,11 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, | |||
1921 | struct iphdr *iph; | 1921 | struct iphdr *iph; |
1922 | struct pktgen_hdr *pgh = NULL; | 1922 | struct pktgen_hdr *pgh = NULL; |
1923 | 1923 | ||
1924 | /* Update any of the values, used when we're incrementing various | ||
1925 | * fields. | ||
1926 | */ | ||
1927 | mod_cur_headers(pkt_dev); | ||
1928 | |||
1924 | skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC); | 1929 | skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC); |
1925 | if (!skb) { | 1930 | if (!skb) { |
1926 | sprintf(pkt_dev->result, "No memory"); | 1931 | sprintf(pkt_dev->result, "No memory"); |
@@ -1934,11 +1939,6 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev, | |||
1934 | iph = (struct iphdr *)skb_put(skb, sizeof(struct iphdr)); | 1939 | iph = (struct iphdr *)skb_put(skb, sizeof(struct iphdr)); |
1935 | udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); | 1940 | udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); |
1936 | 1941 | ||
1937 | /* Update any of the values, used when we're incrementing various | ||
1938 | * fields. | ||
1939 | */ | ||
1940 | mod_cur_headers(pkt_dev); | ||
1941 | |||
1942 | memcpy(eth, pkt_dev->hh, 12); | 1942 | memcpy(eth, pkt_dev->hh, 12); |
1943 | *(u16*)ð[12] = __constant_htons(ETH_P_IP); | 1943 | *(u16*)ð[12] = __constant_htons(ETH_P_IP); |
1944 | 1944 | ||
@@ -2192,7 +2192,12 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, | |||
2192 | int datalen; | 2192 | int datalen; |
2193 | struct ipv6hdr *iph; | 2193 | struct ipv6hdr *iph; |
2194 | struct pktgen_hdr *pgh = NULL; | 2194 | struct pktgen_hdr *pgh = NULL; |
2195 | 2195 | ||
2196 | /* Update any of the values, used when we're incrementing various | ||
2197 | * fields. | ||
2198 | */ | ||
2199 | mod_cur_headers(pkt_dev); | ||
2200 | |||
2196 | skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC); | 2201 | skb = alloc_skb(pkt_dev->cur_pkt_size + 64 + 16, GFP_ATOMIC); |
2197 | if (!skb) { | 2202 | if (!skb) { |
2198 | sprintf(pkt_dev->result, "No memory"); | 2203 | sprintf(pkt_dev->result, "No memory"); |
@@ -2206,17 +2211,9 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev, | |||
2206 | iph = (struct ipv6hdr *)skb_put(skb, sizeof(struct ipv6hdr)); | 2211 | iph = (struct ipv6hdr *)skb_put(skb, sizeof(struct ipv6hdr)); |
2207 | udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); | 2212 | udph = (struct udphdr *)skb_put(skb, sizeof(struct udphdr)); |
2208 | 2213 | ||
2209 | |||
2210 | /* Update any of the values, used when we're incrementing various | ||
2211 | * fields. | ||
2212 | */ | ||
2213 | mod_cur_headers(pkt_dev); | ||
2214 | |||
2215 | |||
2216 | memcpy(eth, pkt_dev->hh, 12); | 2214 | memcpy(eth, pkt_dev->hh, 12); |
2217 | *(u16*)ð[12] = __constant_htons(ETH_P_IPV6); | 2215 | *(u16*)ð[12] = __constant_htons(ETH_P_IPV6); |
2218 | 2216 | ||
2219 | |||
2220 | datalen = pkt_dev->cur_pkt_size-14- | 2217 | datalen = pkt_dev->cur_pkt_size-14- |
2221 | sizeof(struct ipv6hdr)-sizeof(struct udphdr); /* Eth + IPh + UDPh */ | 2218 | sizeof(struct ipv6hdr)-sizeof(struct udphdr); /* Eth + IPh + UDPh */ |
2222 | 2219 | ||
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig index 347083433120..3e63123f7bbd 100644 --- a/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig | |||
@@ -448,7 +448,6 @@ config IP_TCPDIAG_IPV6 | |||
448 | config TCP_CONG_ADVANCED | 448 | config TCP_CONG_ADVANCED |
449 | bool "TCP: advanced congestion control" | 449 | bool "TCP: advanced congestion control" |
450 | depends on INET | 450 | depends on INET |
451 | default y | ||
452 | ---help--- | 451 | ---help--- |
453 | Support for selection of various TCP congestion control | 452 | Support for selection of various TCP congestion control |
454 | modules. | 453 | modules. |
@@ -549,7 +548,7 @@ config TCP_CONG_SCALABLE | |||
549 | endmenu | 548 | endmenu |
550 | 549 | ||
551 | config TCP_CONG_BIC | 550 | config TCP_CONG_BIC |
552 | boolean | 551 | tristate |
553 | depends on !TCP_CONG_ADVANCED | 552 | depends on !TCP_CONG_ADVANCED |
554 | default y | 553 | default y |
555 | 554 | ||
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c index 218d9701036e..12a82e91d22a 100644 --- a/net/ipv4/ipvs/ip_vs_ctl.c +++ b/net/ipv4/ipvs/ip_vs_ctl.c | |||
@@ -2059,7 +2059,7 @@ ip_vs_copy_service(struct ip_vs_service_entry *dst, struct ip_vs_service *src) | |||
2059 | dst->addr = src->addr; | 2059 | dst->addr = src->addr; |
2060 | dst->port = src->port; | 2060 | dst->port = src->port; |
2061 | dst->fwmark = src->fwmark; | 2061 | dst->fwmark = src->fwmark; |
2062 | strcpy(dst->sched_name, src->scheduler->name); | 2062 | strlcpy(dst->sched_name, src->scheduler->name, sizeof(dst->sched_name)); |
2063 | dst->flags = src->flags; | 2063 | dst->flags = src->flags; |
2064 | dst->timeout = src->timeout / HZ; | 2064 | dst->timeout = src->timeout / HZ; |
2065 | dst->netmask = src->netmask; | 2065 | dst->netmask = src->netmask; |
@@ -2080,6 +2080,7 @@ __ip_vs_get_service_entries(const struct ip_vs_get_services *get, | |||
2080 | list_for_each_entry(svc, &ip_vs_svc_table[idx], s_list) { | 2080 | list_for_each_entry(svc, &ip_vs_svc_table[idx], s_list) { |
2081 | if (count >= get->num_services) | 2081 | if (count >= get->num_services) |
2082 | goto out; | 2082 | goto out; |
2083 | memset(&entry, 0, sizeof(entry)); | ||
2083 | ip_vs_copy_service(&entry, svc); | 2084 | ip_vs_copy_service(&entry, svc); |
2084 | if (copy_to_user(&uptr->entrytable[count], | 2085 | if (copy_to_user(&uptr->entrytable[count], |
2085 | &entry, sizeof(entry))) { | 2086 | &entry, sizeof(entry))) { |
@@ -2094,6 +2095,7 @@ __ip_vs_get_service_entries(const struct ip_vs_get_services *get, | |||
2094 | list_for_each_entry(svc, &ip_vs_svc_fwm_table[idx], f_list) { | 2095 | list_for_each_entry(svc, &ip_vs_svc_fwm_table[idx], f_list) { |
2095 | if (count >= get->num_services) | 2096 | if (count >= get->num_services) |
2096 | goto out; | 2097 | goto out; |
2098 | memset(&entry, 0, sizeof(entry)); | ||
2097 | ip_vs_copy_service(&entry, svc); | 2099 | ip_vs_copy_service(&entry, svc); |
2098 | if (copy_to_user(&uptr->entrytable[count], | 2100 | if (copy_to_user(&uptr->entrytable[count], |
2099 | &entry, sizeof(entry))) { | 2101 | &entry, sizeof(entry))) { |
@@ -2304,12 +2306,12 @@ do_ip_vs_get_ctl(struct sock *sk, int cmd, void __user *user, int *len) | |||
2304 | memset(&d, 0, sizeof(d)); | 2306 | memset(&d, 0, sizeof(d)); |
2305 | if (ip_vs_sync_state & IP_VS_STATE_MASTER) { | 2307 | if (ip_vs_sync_state & IP_VS_STATE_MASTER) { |
2306 | d[0].state = IP_VS_STATE_MASTER; | 2308 | d[0].state = IP_VS_STATE_MASTER; |
2307 | strcpy(d[0].mcast_ifn, ip_vs_master_mcast_ifn); | 2309 | strlcpy(d[0].mcast_ifn, ip_vs_master_mcast_ifn, sizeof(d[0].mcast_ifn)); |
2308 | d[0].syncid = ip_vs_master_syncid; | 2310 | d[0].syncid = ip_vs_master_syncid; |
2309 | } | 2311 | } |
2310 | if (ip_vs_sync_state & IP_VS_STATE_BACKUP) { | 2312 | if (ip_vs_sync_state & IP_VS_STATE_BACKUP) { |
2311 | d[1].state = IP_VS_STATE_BACKUP; | 2313 | d[1].state = IP_VS_STATE_BACKUP; |
2312 | strcpy(d[1].mcast_ifn, ip_vs_backup_mcast_ifn); | 2314 | strlcpy(d[1].mcast_ifn, ip_vs_backup_mcast_ifn, sizeof(d[1].mcast_ifn)); |
2313 | d[1].syncid = ip_vs_backup_syncid; | 2315 | d[1].syncid = ip_vs_backup_syncid; |
2314 | } | 2316 | } |
2315 | if (copy_to_user(user, &d, sizeof(d)) != 0) | 2317 | if (copy_to_user(user, &d, sizeof(d)) != 0) |
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c index 25c479550a32..574d1f509b46 100644 --- a/net/ipv4/ipvs/ip_vs_sync.c +++ b/net/ipv4/ipvs/ip_vs_sync.c | |||
@@ -839,10 +839,10 @@ int start_sync_thread(int state, char *mcast_ifn, __u8 syncid) | |||
839 | 839 | ||
840 | ip_vs_sync_state |= state; | 840 | ip_vs_sync_state |= state; |
841 | if (state == IP_VS_STATE_MASTER) { | 841 | if (state == IP_VS_STATE_MASTER) { |
842 | strcpy(ip_vs_master_mcast_ifn, mcast_ifn); | 842 | strlcpy(ip_vs_master_mcast_ifn, mcast_ifn, sizeof(ip_vs_master_mcast_ifn)); |
843 | ip_vs_master_syncid = syncid; | 843 | ip_vs_master_syncid = syncid; |
844 | } else { | 844 | } else { |
845 | strcpy(ip_vs_backup_mcast_ifn, mcast_ifn); | 845 | strlcpy(ip_vs_backup_mcast_ifn, mcast_ifn, sizeof(ip_vs_backup_mcast_ifn)); |
846 | ip_vs_backup_syncid = syncid; | 846 | ip_vs_backup_syncid = syncid; |
847 | } | 847 | } |
848 | 848 | ||
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 70bcd4744d93..fc456a7aaec3 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c | |||
@@ -315,8 +315,8 @@ err: | |||
315 | static void netlink_remove(struct sock *sk) | 315 | static void netlink_remove(struct sock *sk) |
316 | { | 316 | { |
317 | netlink_table_grab(); | 317 | netlink_table_grab(); |
318 | nl_table[sk->sk_protocol].hash.entries--; | 318 | if (sk_del_node_init(sk)) |
319 | sk_del_node_init(sk); | 319 | nl_table[sk->sk_protocol].hash.entries--; |
320 | if (nlk_sk(sk)->groups) | 320 | if (nlk_sk(sk)->groups) |
321 | __sk_del_bind_node(sk); | 321 | __sk_del_bind_node(sk); |
322 | netlink_table_ungrab(); | 322 | netlink_table_ungrab(); |
@@ -429,7 +429,12 @@ retry: | |||
429 | err = netlink_insert(sk, pid); | 429 | err = netlink_insert(sk, pid); |
430 | if (err == -EADDRINUSE) | 430 | if (err == -EADDRINUSE) |
431 | goto retry; | 431 | goto retry; |
432 | return 0; | 432 | |
433 | /* If 2 threads race to autobind, that is fine. */ | ||
434 | if (err == -EBUSY) | ||
435 | err = 0; | ||
436 | |||
437 | return err; | ||
433 | } | 438 | } |
434 | 439 | ||
435 | static inline int netlink_capable(struct socket *sock, unsigned int flag) | 440 | static inline int netlink_capable(struct socket *sock, unsigned int flag) |