diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/dst.h | 2 | ||||
-rw-r--r-- | include/net/rose.h | 8 | ||||
-rw-r--r-- | include/net/xfrm.h | 22 |
3 files changed, 30 insertions, 2 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 2a46cbaef92d..75b95df4afe7 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -345,7 +345,7 @@ static inline void skb_tunnel_rx(struct sk_buff *skb, struct net_device *dev) | |||
345 | 345 | ||
346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) | 346 | static inline struct dst_entry *skb_dst_pop(struct sk_buff *skb) |
347 | { | 347 | { |
348 | struct dst_entry *child = skb_dst(skb)->child; | 348 | struct dst_entry *child = dst_clone(skb_dst(skb)->child); |
349 | 349 | ||
350 | skb_dst_drop(skb); | 350 | skb_dst_drop(skb); |
351 | return child; | 351 | return child; |
diff --git a/include/net/rose.h b/include/net/rose.h index 5ba9f02731eb..555dd198aab7 100644 --- a/include/net/rose.h +++ b/include/net/rose.h | |||
@@ -14,6 +14,12 @@ | |||
14 | 14 | ||
15 | #define ROSE_MIN_LEN 3 | 15 | #define ROSE_MIN_LEN 3 |
16 | 16 | ||
17 | #define ROSE_CALL_REQ_ADDR_LEN_OFF 3 | ||
18 | #define ROSE_CALL_REQ_ADDR_LEN_VAL 0xAA /* each address is 10 digits */ | ||
19 | #define ROSE_CALL_REQ_DEST_ADDR_OFF 4 | ||
20 | #define ROSE_CALL_REQ_SRC_ADDR_OFF 9 | ||
21 | #define ROSE_CALL_REQ_FACILITIES_OFF 14 | ||
22 | |||
17 | #define ROSE_GFI 0x10 | 23 | #define ROSE_GFI 0x10 |
18 | #define ROSE_Q_BIT 0x80 | 24 | #define ROSE_Q_BIT 0x80 |
19 | #define ROSE_D_BIT 0x40 | 25 | #define ROSE_D_BIT 0x40 |
@@ -214,7 +220,7 @@ extern void rose_requeue_frames(struct sock *); | |||
214 | extern int rose_validate_nr(struct sock *, unsigned short); | 220 | extern int rose_validate_nr(struct sock *, unsigned short); |
215 | extern void rose_write_internal(struct sock *, int); | 221 | extern void rose_write_internal(struct sock *, int); |
216 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); | 222 | extern int rose_decode(struct sk_buff *, int *, int *, int *, int *, int *); |
217 | extern int rose_parse_facilities(unsigned char *, struct rose_facilities_struct *); | 223 | extern int rose_parse_facilities(unsigned char *, unsigned int, struct rose_facilities_struct *); |
218 | extern void rose_disconnect(struct sock *, int, int, int); | 224 | extern void rose_disconnect(struct sock *, int, int, int); |
219 | 225 | ||
220 | /* rose_timer.c */ | 226 | /* rose_timer.c */ |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index cffa5dc66449..6ae4bc5ce8a7 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -1601,6 +1601,28 @@ static inline int xfrm_replay_state_esn_len(struct xfrm_replay_state_esn *replay | |||
1601 | } | 1601 | } |
1602 | 1602 | ||
1603 | #ifdef CONFIG_XFRM_MIGRATE | 1603 | #ifdef CONFIG_XFRM_MIGRATE |
1604 | static inline int xfrm_replay_clone(struct xfrm_state *x, | ||
1605 | struct xfrm_state *orig) | ||
1606 | { | ||
1607 | x->replay_esn = kzalloc(xfrm_replay_state_esn_len(orig->replay_esn), | ||
1608 | GFP_KERNEL); | ||
1609 | if (!x->replay_esn) | ||
1610 | return -ENOMEM; | ||
1611 | |||
1612 | x->replay_esn->bmp_len = orig->replay_esn->bmp_len; | ||
1613 | x->replay_esn->replay_window = orig->replay_esn->replay_window; | ||
1614 | |||
1615 | x->preplay_esn = kmemdup(x->replay_esn, | ||
1616 | xfrm_replay_state_esn_len(x->replay_esn), | ||
1617 | GFP_KERNEL); | ||
1618 | if (!x->preplay_esn) { | ||
1619 | kfree(x->replay_esn); | ||
1620 | return -ENOMEM; | ||
1621 | } | ||
1622 | |||
1623 | return 0; | ||
1624 | } | ||
1625 | |||
1604 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) | 1626 | static inline struct xfrm_algo *xfrm_algo_clone(struct xfrm_algo *orig) |
1605 | { | 1627 | { |
1606 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); | 1628 | return kmemdup(orig, xfrm_alg_len(orig), GFP_KERNEL); |