diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 22:26:41 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-17 22:26:41 -0800 |
commit | ccb19d263fd1c9e34948e2158c53eacbff369344 (patch) | |
tree | 6683e55f183920dcbf3e1a5b749e7f9780c465b3 /net/ipv4 | |
parent | 6a488979f574cb4287880db2dbc8b13cee30c5be (diff) | |
parent | c3b5003b628d8e373262bee42c7260d6a799c73e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
tg3: Fix single-vector MSI-X code
openvswitch: Fix multipart datapath dumps.
ipv6: fix per device IP snmp counters
inetpeer: initialize ->redirect_genid in inet_getpeer()
net: fix NULL-deref in WARN() in skb_gso_segment()
net: WARN if skb_checksum_help() is called on skb requiring segmentation
caif: Remove bad WARN_ON in caif_dev
caif: Fix typo in Vendor/Product-ID for CAIF modems
bnx2x: Disable AN KR work-around for BCM57810
bnx2x: Remove AutoGrEEEn for BCM84833
bnx2x: Remove 100Mb force speed for BCM84833
bnx2x: Fix PFC setting on BCM57840
bnx2x: Fix Super-Isolate mode for BCM84833
net: fix some sparse errors
net: kill duplicate included header
net: sh-eth: Fix build error by the value which is not defined
net: Use device model to get driver name in skb_gso_segment()
bridge: BH already disabled in br_fdb_cleanup()
net: move sock_update_memcg outside of CONFIG_INET
mwl8k: Fixing Sparse ENDIAN CHECK warning
...
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/inetpeer.c | 3 | ||||
-rw-r--r-- | net/ipv4/ipconfig.c | 8 | ||||
-rw-r--r-- | net/ipv4/ping.c | 27 | ||||
-rw-r--r-- | net/ipv4/udp_diag.c | 1 |
4 files changed, 20 insertions, 19 deletions
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c index 86f13c67ea85..bf4a9c4808e1 100644 --- a/net/ipv4/inetpeer.c +++ b/net/ipv4/inetpeer.c @@ -136,7 +136,7 @@ static int addr_compare(const struct inetpeer_addr *a, for (i = 0; i < n; i++) { if (a->addr.a6[i] == b->addr.a6[i]) continue; - if (a->addr.a6[i] < b->addr.a6[i]) + if ((__force u32)a->addr.a6[i] < (__force u32)b->addr.a6[i]) return -1; return 1; } @@ -447,6 +447,7 @@ relookup: p->rate_last = 0; p->pmtu_expires = 0; p->pmtu_orig = 0; + p->redirect_genid = 0; memset(&p->redirect_learned, 0, sizeof(p->redirect_learned)); diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 7e4ec9fc2cef..6e412a60a91f 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -141,7 +141,7 @@ __be32 ic_servaddr = NONE; /* Boot server IP address */ __be32 root_server_addr = NONE; /* Address of NFS server */ u8 root_server_path[256] = { 0, }; /* Path to mount as root */ -u32 ic_dev_xid; /* Device under configuration */ +__be32 ic_dev_xid; /* Device under configuration */ /* vendor class identifier */ static char vendor_class_identifier[253] __initdata; @@ -859,9 +859,9 @@ static int __init ic_bootp_string(char *dest, char *src, int len, int max) */ static void __init ic_do_bootp_ext(u8 *ext) { - u8 servers; - int i; - u16 mtu; + u8 servers; + int i; + __be16 mtu; #ifdef IPCONFIG_DEBUG u8 *c; diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c index 43d4c3b22369..aea5a199c37a 100644 --- a/net/ipv4/ping.c +++ b/net/ipv4/ping.c @@ -140,13 +140,14 @@ static void ping_v4_unhash(struct sock *sk) write_lock_bh(&ping_table.lock); hlist_nulls_del(&sk->sk_nulls_node); sock_put(sk); - isk->inet_num = isk->inet_sport = 0; + isk->inet_num = 0; + isk->inet_sport = 0; sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); write_unlock_bh(&ping_table.lock); } } -static struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr, +static struct sock *ping_v4_lookup(struct net *net, __be32 saddr, __be32 daddr, u16 ident, int dif) { struct hlist_nulls_head *hslot = ping_hashslot(&ping_table, net, ident); @@ -154,15 +155,15 @@ static struct sock *ping_v4_lookup(struct net *net, u32 saddr, u32 daddr, struct inet_sock *isk; struct hlist_nulls_node *hnode; - pr_debug("try to find: num = %d, daddr = %ld, dif = %d\n", - (int)ident, (unsigned long)daddr, dif); + pr_debug("try to find: num = %d, daddr = %pI4, dif = %d\n", + (int)ident, &daddr, dif); read_lock_bh(&ping_table.lock); ping_portaddr_for_each_entry(sk, hnode, hslot) { isk = inet_sk(sk); - pr_debug("found: %p: num = %d, daddr = %ld, dif = %d\n", sk, - (int)isk->inet_num, (unsigned long)isk->inet_rcv_saddr, + pr_debug("found: %p: num = %d, daddr = %pI4, dif = %d\n", sk, + (int)isk->inet_num, &isk->inet_rcv_saddr, sk->sk_bound_dev_if); pr_debug("iterate\n"); @@ -254,7 +255,7 @@ static int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) sk, addr->sin_addr.s_addr, ntohs(addr->sin_port)); chk_addr_ret = inet_addr_type(sock_net(sk), addr->sin_addr.s_addr); - if (addr->sin_addr.s_addr == INADDR_ANY) + if (addr->sin_addr.s_addr == htonl(INADDR_ANY)) chk_addr_ret = RTN_LOCAL; if ((sysctl_ip_nonlocal_bind == 0 && @@ -278,9 +279,9 @@ static int ping_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len) goto out; } - pr_debug("after bind(): num = %d, daddr = %ld, dif = %d\n", + pr_debug("after bind(): num = %d, daddr = %pI4, dif = %d\n", (int)isk->inet_num, - (unsigned long) isk->inet_rcv_saddr, + &isk->inet_rcv_saddr, (int)sk->sk_bound_dev_if); err = 0; @@ -407,7 +408,7 @@ out: struct pingfakehdr { struct icmphdr icmph; struct iovec *iov; - u32 wcheck; + __wsum wcheck; }; static int ping_getfrag(void *from, char * to, @@ -459,7 +460,7 @@ static int ping_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, struct rtable *rt = NULL; struct ip_options_data opt_copy; int free = 0; - u32 saddr, daddr, faddr; + __be32 saddr, daddr, faddr; u8 tos; int err; @@ -696,8 +697,8 @@ void ping_rcv(struct sk_buff *skb) struct net *net = dev_net(skb->dev); struct iphdr *iph = ip_hdr(skb); struct icmphdr *icmph = icmp_hdr(skb); - u32 saddr = iph->saddr; - u32 daddr = iph->daddr; + __be32 saddr = iph->saddr; + __be32 daddr = iph->daddr; /* We assume the packet has already been checked by icmp_rcv */ diff --git a/net/ipv4/udp_diag.c b/net/ipv4/udp_diag.c index e5e18cb8a586..8a949f19deb6 100644 --- a/net/ipv4/udp_diag.c +++ b/net/ipv4/udp_diag.c @@ -15,7 +15,6 @@ #include <linux/udp.h> #include <net/udp.h> #include <net/udplite.h> -#include <linux/inet_diag.h> #include <linux/sock_diag.h> static int sk_diag_dump(struct sock *sk, struct sk_buff *skb, |