Merge tag 'header_cleanup-2024-01-20' of https://evilpiepirate.org/git/bcachefs
[linux-block.git] / net / ipv6 / exthdrs.c
index 202fc3aaa83cccb6ba9628acead1a4f06c027418..4952ae792450575d275f1565d2bc198e440b67f6 100644 (file)
@@ -612,8 +612,6 @@ looped_back:
 
        kfree(buf);
 
-       skb_dst_drop(skb);
-
        ip6_route_input(skb);
 
        if (skb_dst(skb)->error) {
@@ -650,7 +648,6 @@ static int ipv6_rthdr_rcv(struct sk_buff *skb)
        struct inet6_dev *idev = __in6_dev_get(skb->dev);
        struct inet6_skb_parm *opt = IP6CB(skb);
        struct in6_addr *addr = NULL;
-       struct in6_addr daddr;
        int n, i;
        struct ipv6_rt_hdr *hdr;
        struct rt0_hdr *rthdr;
@@ -798,9 +795,7 @@ looped_back:
                return -1;
        }
 
-       daddr = *addr;
-       *addr = ipv6_hdr(skb)->daddr;
-       ipv6_hdr(skb)->daddr = daddr;
+       swap(*addr, ipv6_hdr(skb)->daddr);
 
        ip6_route_input(skb);
        if (skb_dst(skb)->error) {