Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194633
b: refs/heads/master
c: 6429d3d
h: refs/heads/master
i:
  194631: 0aa1aae
v: v3
  • Loading branch information
Wei Yongjun authored and Vlad Yasevich committed May 1, 2010
1 parent 500327e commit 99ea99b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 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: 52688d6ec977e69b164e0bd3de51d43cf6d4b7b3
refs/heads/master: 6429d3dc4bd6251b01c11b851e23a4d60f079e06
7 changes: 6 additions & 1 deletion trunk/net/sctp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,13 +474,17 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,

memset(&fl, 0x0, sizeof(struct flowi));
fl.fl4_dst = daddr->v4.sin_addr.s_addr;
fl.fl_ip_dport = daddr->v4.sin_port;
fl.proto = IPPROTO_SCTP;
if (asoc) {
fl.fl4_tos = RT_CONN_FLAGS(asoc->base.sk);
fl.oif = asoc->base.sk->sk_bound_dev_if;
fl.fl_ip_sport = htons(asoc->base.bind_addr.port);
}
if (saddr)
if (saddr) {
fl.fl4_src = saddr->v4.sin_addr.s_addr;
fl.fl_ip_sport = saddr->v4.sin_port;
}

SCTP_DEBUG_PRINTK("%s: DST:%pI4, SRC:%pI4 - ",
__func__, &fl.fl4_dst, &fl.fl4_src);
Expand Down Expand Up @@ -528,6 +532,7 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
if ((laddr->state == SCTP_ADDR_SRC) &&
(AF_INET == laddr->a.sa.sa_family)) {
fl.fl4_src = laddr->a.v4.sin_addr.s_addr;
fl.fl_ip_sport = laddr->a.v4.sin_port;
if (!ip_route_output_key(&init_net, &rt, &fl)) {
dst = &rt->u.dst;
goto out_unlock;
Expand Down

0 comments on commit 99ea99b

Please sign in to comment.