]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/ipv6.c
[XFRM]: Use output device disable_xfrm for forwarded packets
[linux-2.6-omap-h63xx.git] / net / sctp / ipv6.c
index d6b585b85cbb40673580f2b124e986b3270af030..3c3e560087ca37d3b6b174ea9859f419820f1027 100644 (file)
@@ -161,17 +161,15 @@ static int sctp_v6_xmit(struct sk_buff *skb, struct sctp_transport *transport,
        /* Fill in the dest address from the route entry passed with the skb
         * and the source address from the transport.
         */
-       ipv6_addr_copy(&fl.fl6_dst, &transport->ipaddr_h.v6.sin6_addr);
-       ipv6_addr_copy(&fl.fl6_src, &transport->saddr_h.v6.sin6_addr);
+       ipv6_addr_copy(&fl.fl6_dst, &transport->ipaddr.v6.sin6_addr);
+       ipv6_addr_copy(&fl.fl6_src, &transport->saddr.v6.sin6_addr);
 
        fl.fl6_flowlabel = np->flow_label;
        IP6_ECN_flow_xmit(sk, fl.fl6_flowlabel);
        if (ipv6_addr_type(&fl.fl6_src) & IPV6_ADDR_LINKLOCAL)
-               fl.oif = transport->saddr_h.v6.sin6_scope_id;
+               fl.oif = transport->saddr.v6.sin6_scope_id;
        else
                fl.oif = sk->sk_bound_dev_if;
-       fl.fl_ip_sport = inet_sk(sk)->sport;
-       fl.fl_ip_dport = transport->ipaddr_h.v6.sin6_port;
 
        if (np->opt && np->opt->srcrt) {
                struct rt0_hdr *rt0 = (struct rt0_hdr *) np->opt->srcrt;
@@ -290,11 +288,11 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
        list_for_each(pos, &bp->address_list) {
                laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
                if ((laddr->use_as_src) &&
-                   (laddr->a_h.sa.sa_family == AF_INET6) &&
-                   (scope <= sctp_scope(&laddr->a_h))) {
-                       bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a_h);
+                   (laddr->a.sa.sa_family == AF_INET6) &&
+                   (scope <= sctp_scope(&laddr->a))) {
+                       bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a);
                        if (!baddr || (matchlen < bmatchlen)) {
-                               baddr = &laddr->a_h;
+                               baddr = &laddr->a;
                                matchlen = bmatchlen;
                        }
                }
@@ -336,7 +334,6 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist,
                        addr->a.v6.sin6_port = 0;
                        addr->a.v6.sin6_addr = ifp->addr;
                        addr->a.v6.sin6_scope_id = dev->ifindex;
-                       addr->a_h = addr->a;
                        INIT_LIST_HEAD(&addr->list);
                        list_add_tail(&addr->list, addrlist);
                }
@@ -374,7 +371,7 @@ static void sctp_v6_from_skb(union sctp_addr *addr,struct sk_buff *skb,
 static void sctp_v6_from_sk(union sctp_addr *addr, struct sock *sk)
 {
        addr->v6.sin6_family = AF_INET6;
-       addr->v6.sin6_port = inet_sk(sk)->num;
+       addr->v6.sin6_port = 0;
        addr->v6.sin6_addr = inet6_sk(sk)->rcv_saddr;
 }
 
@@ -408,7 +405,7 @@ static void sctp_v6_to_sk_daddr(union sctp_addr *addr, struct sock *sk)
 /* Initialize a sctp_addr from an address parameter. */
 static void sctp_v6_from_addr_param(union sctp_addr *addr,
                                    union sctp_addr_param *param,
-                                   __u16 port, int iif)
+                                   __be16 port, int iif)
 {
        addr->v6.sin6_family = AF_INET6;
        addr->v6.sin6_port = port;
@@ -481,7 +478,7 @@ static int sctp_v6_cmp_addr(const union sctp_addr *addr1,
 }
 
 /* Initialize addr struct to INADDR_ANY. */
-static void sctp_v6_inaddr_any(union sctp_addr *addr, unsigned short port)
+static void sctp_v6_inaddr_any(union sctp_addr *addr, __be16 port)
 {
        memset(addr, 0x00, sizeof(union sctp_addr));
        addr->v6.sin6_family = AF_INET6;
@@ -856,7 +853,7 @@ static int sctp_inet6_send_verify(struct sctp_sock *opt, union sctp_addr *addr)
  * Returns number of addresses supported.
  */
 static int sctp_inet6_supported_addrs(const struct sctp_sock *opt,
-                                     __u16 *types)
+                                     __be16 *types)
 {
        types[0] = SCTP_PARAM_IPV4_ADDRESS;
        types[1] = SCTP_PARAM_IPV6_ADDRESS;