]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/input.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[linux-2.6-omap-h63xx.git] / net / sctp / input.c
index d354a23972d4065b6de367968d90bc7d35da9d7d..bf612d954d413fd46ccc489202f8014b5b2ae556 100644 (file)
@@ -61,6 +61,7 @@
 #include <net/sctp/sctp.h>
 #include <net/sctp/sm.h>
 #include <net/sctp/checksum.h>
+#include <net/net_namespace.h>
 
 /* Forward declarations for internal helpers. */
 static int sctp_rcv_ootb(struct sk_buff *);
@@ -82,8 +83,8 @@ static inline int sctp_rcv_checksum(struct sk_buff *skb)
 {
        struct sk_buff *list = skb_shinfo(skb)->frag_list;
        struct sctphdr *sh = sctp_hdr(skb);
-       __u32 cmp = ntohl(sh->checksum);
-       __u32 val = sctp_start_cksum((__u8 *)sh, skb_headlen(skb));
+       __be32 cmp = sh->checksum;
+       __be32 val = sctp_start_cksum((__u8 *)sh, skb_headlen(skb));
 
        for (; list; list = list->next)
                val = sctp_update_cksum((__u8 *)list->data, skb_headlen(list),
@@ -368,7 +369,7 @@ static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
 void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
                           struct sctp_transport *t, __u32 pmtu)
 {
-       if (!t || (t->pathmtu == pmtu))
+       if (!t || (t->pathmtu <= pmtu))
                return;
 
        if (sock_owned_by_user(sk)) {
@@ -485,7 +486,7 @@ struct sock *sctp_err_lookup(int family, struct sk_buff *skb,
         * servers this needs to be solved differently.
         */
        if (sock_owned_by_user(sk))
-               NET_INC_STATS_BH(LINUX_MIB_LOCKDROPPEDICMPS);
+               NET_INC_STATS_BH(&init_net, LINUX_MIB_LOCKDROPPEDICMPS);
 
        *app = asoc;
        *tpp = transport;
@@ -534,7 +535,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
        int err;
 
        if (skb->len < ihlen + 8) {
-               ICMP_INC_STATS_BH(ICMP_MIB_INERRORS);
+               ICMP_INC_STATS_BH(&init_net, ICMP_MIB_INERRORS);
                return;
        }
 
@@ -548,7 +549,7 @@ void sctp_v4_err(struct sk_buff *skb, __u32 info)
        skb->network_header = saveip;
        skb->transport_header = savesctp;
        if (!sk) {
-               ICMP_INC_STATS_BH(ICMP_MIB_INERRORS);
+               ICMP_INC_STATS_BH(&init_net, ICMP_MIB_INERRORS);
                return;
        }
        /* Warning:  The sock lock is held.  Remember to call