patch-2.4.22 linux-2.4.22/net/ax25/ax25_ip.c
Next file: linux-2.4.22/net/ax25/ax25_out.c
Previous file: linux-2.4.22/net/atm/svc.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
2003-08-25 04:44:44.000000000 -0700
- Orig file:
linux-2.4.21/net/ax25/ax25_ip.c
- Orig date:
2001-10-12 14:22:49.000000000 -0700
diff -urN linux-2.4.21/net/ax25/ax25_ip.c linux-2.4.22/net/ax25/ax25_ip.c
@@ -160,9 +160,15 @@
skb_set_owner_w(ourskb, skb->sk);
kfree_skb(skb);
-
- src_c = *src;
- dst_c = *dst;
+ /* dl9sau: bugfix
+ * after kfree_skb(), dst and src which were pointer
+ * to bp which is part of skb->data would not be valid
+ * anymore hope that after skb_pull(ourskb, ..) our
+ * dsc_c and src_c will not become invalid
+ */
+ bp = ourskb->data;
+ dst_c = *(ax25_address *)(bp + 1);
+ src_c = *(ax25_address *)(bp + 8);
skb_pull(ourskb, AX25_HEADER_LEN - 1); /* Keep PID */
ourskb->nh.raw = ourskb->data;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)