diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
commit | 03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch) | |
tree | 88db8dba75ae06ba3bad08e42c5e52efc162535c /net/ax25 | |
parent | 257730f99381dd26e10b832fce4c94cae7ac1176 (diff) |
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'net/ax25')
-rw-r--r-- | net/ax25/af_ax25.c | 2 | ||||
-rw-r--r-- | net/ax25/ax25_ip.c | 22 |
2 files changed, 17 insertions, 7 deletions
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c index 71999a416..cd84989a6 100644 --- a/net/ax25/af_ax25.c +++ b/net/ax25/af_ax25.c @@ -849,7 +849,6 @@ int ax25_create(struct socket *sock, int protocol) sk->destruct = ax25_free_sock; sock->ops = &ax25_proto_ops; sk->protocol = protocol; - sk->mtu = AX25_MTU; /* 256 */ ax25->sk = sk; sk->protinfo.ax25 = ax25; @@ -892,7 +891,6 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev) sk->sndbuf = osk->sndbuf; sk->debug = osk->debug; sk->state = TCP_ESTABLISHED; - sk->mtu = osk->mtu; sk->sleep = osk->sleep; sk->zapped = osk->zapped; diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c index c285b4641..b5d5f071e 100644 --- a/net/ax25/ax25_ip.c +++ b/net/ax25/ax25_ip.c @@ -106,7 +106,7 @@ int ax25_rebuild_header(struct sk_buff *skb) { struct sk_buff *ourskb; unsigned char *bp = skb->data; - struct device *dev = skb->dev; + struct device *dev; ax25_address *src, *dst; ax25_route *route; ax25_dev *ax25_dev; @@ -117,10 +117,14 @@ int ax25_rebuild_header(struct sk_buff *skb) if (arp_find(bp + 1, skb)) return 1; - if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) - return 1; + route = ax25_rt_find_route(dst, NULL); + dev = route->dev; - route = ax25_rt_find_route(dst, dev); + if (dev == NULL) + dev = skb->dev; + + if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL) + return 1; if (bp[16] == AX25_P_IP) { if (route->ip_mode == 'V' || (route->ip_mode == ' ' && ax25_dev->values[AX25_VALUES_IPDEFMODE])) { @@ -139,6 +143,10 @@ int ax25_rebuild_header(struct sk_buff *skb) * instead of using skb_clone() unless this * gets fixed. */ + + ax25_address src_c; + ax25_address dst_c; + if ((ourskb = skb_copy(skb, GFP_ATOMIC)) == NULL) { kfree_skb(skb); return 1; @@ -149,9 +157,13 @@ int ax25_rebuild_header(struct sk_buff *skb) kfree_skb(skb); + src_c = *src; + dst_c = *dst; + skb_pull(ourskb, AX25_HEADER_LEN - 1); /* Keep PID */ - ax25_send_frame(ourskb, ax25_dev->values[AX25_VALUES_PACLEN], src, dst, route->digipeat, dev); + ax25_send_frame(ourskb, ax25_dev->values[AX25_VALUES_PACLEN], &src_c, +&dst_c, route->digipeat, dev); return 1; } |