Fix common misspellings
[linux-block.git] / net / ipv6 / af_inet6.c
index 978e80e2c4a8a08e7731150d2a43a42fe9827e68..afcc7099f96de4c3eb991a4006936b5c7e95b978 100644 (file)
@@ -644,41 +644,34 @@ EXPORT_SYMBOL(inet6_unregister_protosw);
 
 int inet6_sk_rebuild_header(struct sock *sk)
 {
-       int err;
-       struct dst_entry *dst;
        struct ipv6_pinfo *np = inet6_sk(sk);
+       struct dst_entry *dst;
 
        dst = __sk_dst_check(sk, np->dst_cookie);
 
        if (dst == NULL) {
                struct inet_sock *inet = inet_sk(sk);
                struct in6_addr *final_p, final;
-               struct flowi fl;
-
-               memset(&fl, 0, sizeof(fl));
-               fl.proto = sk->sk_protocol;
-               ipv6_addr_copy(&fl.fl6_dst, &np->daddr);
-               ipv6_addr_copy(&fl.fl6_src, &np->saddr);
-               fl.fl6_flowlabel = np->flow_label;
-               fl.oif = sk->sk_bound_dev_if;
-               fl.mark = sk->sk_mark;
-               fl.fl_ip_dport = inet->inet_dport;
-               fl.fl_ip_sport = inet->inet_sport;
-               security_sk_classify_flow(sk, &fl);
-
-               final_p = fl6_update_dst(&fl, np->opt, &final);
-
-               err = ip6_dst_lookup(sk, &dst, &fl);
-               if (err) {
+               struct flowi6 fl6;
+
+               memset(&fl6, 0, sizeof(fl6));
+               fl6.flowi6_proto = sk->sk_protocol;
+               ipv6_addr_copy(&fl6.daddr, &np->daddr);
+               ipv6_addr_copy(&fl6.saddr, &np->saddr);
+               fl6.flowlabel = np->flow_label;
+               fl6.flowi6_oif = sk->sk_bound_dev_if;
+               fl6.flowi6_mark = sk->sk_mark;
+               fl6.fl6_dport = inet->inet_dport;
+               fl6.fl6_sport = inet->inet_sport;
+               security_sk_classify_flow(sk, flowi6_to_flowi(&fl6));
+
+               final_p = fl6_update_dst(&fl6, np->opt, &final);
+
+               dst = ip6_dst_lookup_flow(sk, &fl6, final_p, false);
+               if (IS_ERR(dst)) {
                        sk->sk_route_caps = 0;
-                       return err;
-               }
-               if (final_p)
-                       ipv6_addr_copy(&fl.fl6_dst, final_p);
-
-               if ((err = xfrm_lookup(sock_net(sk), &dst, &fl, sk, 0)) < 0) {
-                       sk->sk_err_soft = -err;
-                       return err;
+                       sk->sk_err_soft = -PTR_ERR(dst);
+                       return PTR_ERR(dst);
                }
 
                __ip6_dst_store(sk, dst, NULL, NULL);
@@ -772,7 +765,7 @@ out:
        return err;
 }
 
-static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
+static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, u32 features)
 {
        struct sk_buff *segs = ERR_PTR(-EINVAL);
        struct ipv6hdr *ipv6h;
@@ -1120,7 +1113,7 @@ static int __init inet6_init(void)
        /*
         *      ipngwg API draft makes clear that the correct semantics
         *      for TCP and UDP is to consider one TCP and UDP instance
-        *      in a host availiable by both INET and INET6 APIs and
+        *      in a host available by both INET and INET6 APIs and
         *      able to communicate via both network protocols.
         */