diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2007-03-11 21:39:41 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:25:01 -0400 |
commit | c14d2450cb7fe1786e2ec325172baf66922bf597 (patch) | |
tree | 1186bfb1ed197e81a1ff816a513ad69503d5d786 /net/ax25/ax25_out.c | |
parent | 878c814500b123dd61a5e211879a32e5fd932713 (diff) |
[SK_BUFF]: Introduce skb_set_network_header
For the cases where the network header is being set to a offset from skb->data.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ax25/ax25_out.c')
-rw-r--r-- | net/ax25/ax25_out.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c index 02dea851a11a..e66953ce53e7 100644 --- a/net/ax25/ax25_out.c +++ b/net/ax25/ax25_out.c | |||
@@ -148,7 +148,8 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb) | |||
148 | 148 | ||
149 | if (ka9qfrag == 1) { | 149 | if (ka9qfrag == 1) { |
150 | skb_reserve(skbn, frontlen + 2); | 150 | skb_reserve(skbn, frontlen + 2); |
151 | skbn->nh.raw = skbn->data + skb_network_offset(skb); | 151 | skb_set_network_header(skbn, |
152 | skb_network_offset(skb)); | ||
152 | memcpy(skb_put(skbn, len), skb->data, len); | 153 | memcpy(skb_put(skbn, len), skb->data, len); |
153 | p = skb_push(skbn, 2); | 154 | p = skb_push(skbn, 2); |
154 | 155 | ||
@@ -161,7 +162,8 @@ void ax25_output(ax25_cb *ax25, int paclen, struct sk_buff *skb) | |||
161 | } | 162 | } |
162 | } else { | 163 | } else { |
163 | skb_reserve(skbn, frontlen + 1); | 164 | skb_reserve(skbn, frontlen + 1); |
164 | skbn->nh.raw = skbn->data + skb_network_offset(skb); | 165 | skb_set_network_header(skbn, |
166 | skb_network_offset(skb)); | ||
165 | memcpy(skb_put(skbn, len), skb->data, len); | 167 | memcpy(skb_put(skbn, len), skb->data, len); |
166 | p = skb_push(skbn, 1); | 168 | p = skb_push(skbn, 1); |
167 | *p = AX25_P_TEXT; | 169 | *p = AX25_P_TEXT; |