ALSA: snd-usb-caiaq: initialize card pointer
[pandora-kernel.git] / net / ipv4 / ip_sockglue.c
index 043d882..a6e1eeb 100644 (file)
@@ -206,6 +206,8 @@ int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc)
                switch (cmsg->cmsg_type) {
                case IP_RETOPTS:
                        err = cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr));
+
+                       /* Our caller is responsible for freeing ipc->opt */
                        err = ip_options_get(net, &ipc->opt, CMSG_DATA(cmsg),
                                             err < 40 ? err : 40);
                        if (err)
@@ -1007,7 +1009,8 @@ e_inval:
  */
 int ip_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
 {
-       if (!(inet_sk(sk)->cmsg_flags & IP_CMSG_PKTINFO))
+       if (!(inet_sk(sk)->cmsg_flags & IP_CMSG_PKTINFO) &&
+           !IPCB(skb)->opt.optlen)
                skb_dst_drop(skb);
        return sock_queue_rcv_skb(sk, skb);
 }