[IPV6]: Fix source address selection.
[pandora-kernel.git] / net / ipv6 / datagram.c
index cc51840..99a6eb2 100644 (file)
@@ -13,6 +13,7 @@
  *      2 of the License, or (at your option) any later version.
  */
 
+#include <linux/capability.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -437,7 +438,7 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb)
                                break;
                        case IPPROTO_AH:
                                nexthdr = ptr[0];
-                               len = (ptr[1] + 1) << 2;
+                               len = (ptr[1] + 2) << 2;
                                break;
                        default:
                                nexthdr = ptr[0];