Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41827
b: refs/heads/master
c: d3f7a54
h: refs/heads/master
i:
  41825: b2ec6f2
  41823: 4d39495
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 3, 2006
1 parent 4f4e1dc commit 46c8ec8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6a1e5f335461567f593e88b218f1c06817cbd323
refs/heads/master: d3f7a54a295f2ffc9033b425c6538a7e9d7fbe8a
4 changes: 2 additions & 2 deletions trunk/net/sctp/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
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);
bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a);
if (!baddr || (matchlen < bmatchlen)) {
baddr = &laddr->a_h;
baddr = &laddr->a;
matchlen = bmatchlen;
}
}
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/sctp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ static void sctp_v4_get_saddr(struct sctp_association *asoc,

if (rt) {
saddr->v4.sin_family = AF_INET;
saddr->v4.sin_port = asoc->base.bind_addr.port;
saddr->v4.sin_port = htons(asoc->base.bind_addr.port);
saddr->v4.sin_addr.s_addr = rt->rt_src;
}
}
Expand Down
10 changes: 6 additions & 4 deletions trunk/net/sctp/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,11 +256,13 @@ void sctp_transport_route(struct sctp_transport *transport,

dst = af->get_dst(asoc, daddr, saddr);

if (saddr)
if (saddr) {
memcpy(&transport->saddr_h, saddr, sizeof(union sctp_addr));
else
af->get_saddr(asoc, dst, daddr, &transport->saddr_h);
flip_to_n(&transport->saddr, &transport->saddr_h);
flip_to_n(&transport->saddr, &transport->saddr_h);
} else {
af->get_saddr(asoc, dst, &transport->ipaddr, &transport->saddr);
flip_to_h(&transport->saddr_h, &transport->saddr);
}

transport->dst = dst;
if ((transport->param_flags & SPP_PMTUD_DISABLE) && transport->pathmtu) {
Expand Down

0 comments on commit 46c8ec8

Please sign in to comment.