]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/gtp.c
net: fddi: skfp: use %p format specifier for addresses rather than %x
[karo-tx-linux.git] / drivers / net / gtp.c
index 98f10c21652140a57cf2ee89ee1ff3b25a7802ba..8b6810bad54b73fc90da579521e1e20050933aac 100644 (file)
@@ -158,9 +158,9 @@ static bool gtp_check_src_ms_ipv4(struct sk_buff *skb, struct pdp_ctx *pctx,
        if (!pskb_may_pull(skb, hdrlen + sizeof(struct iphdr)))
                return false;
 
-       iph = (struct iphdr *)(skb->data + hdrlen + sizeof(struct iphdr));
+       iph = (struct iphdr *)(skb->data + hdrlen);
 
-       return iph->saddr != pctx->ms_addr_ip4.s_addr;
+       return iph->saddr == pctx->ms_addr_ip4.s_addr;
 }
 
 /* Check if the inner IP source address in this packet is assigned to any
@@ -423,11 +423,11 @@ static inline void gtp1_push_header(struct sk_buff *skb, struct pdp_ctx *pctx)
 
        /* Bits    8  7  6  5  4  3  2  1
         *        +--+--+--+--+--+--+--+--+
-        *        |version |PT| 1| E| S|PN|
+        *        |version |PT| 0| E| S|PN|
         *        +--+--+--+--+--+--+--+--+
         *          0  0  1  1  1  0  0  0
         */
-       gtp1->flags     = 0x38; /* v1, GTP-non-prime. */
+       gtp1->flags     = 0x30; /* v1, GTP-non-prime. */
        gtp1->type      = GTP_TPDU;
        gtp1->length    = htons(payload_len);
        gtp1->tid       = htonl(pctx->u.v1.o_tei);