Skip to content

Commit fca11eb

Browse files
committed
esp4: Reorganize esp_output
We need a fallback for ESP at layer 2, so split esp_output into generic functions that can be used at layer 3 and layer 2 and use them in esp_output. We also add esp_xmit which is used for the layer 2 fallback. Signed-off-by: Steffen Klassert <[email protected]>
1 parent f1fbed0 commit fca11eb

File tree

3 files changed

+301
-158
lines changed

3 files changed

+301
-158
lines changed

include/net/esp.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,20 @@ static inline struct ip_esp_hdr *ip_esp_hdr(const struct sk_buff *skb)
1010
return (struct ip_esp_hdr *)skb_transport_header(skb);
1111
}
1212

13+
struct esp_info {
14+
struct ip_esp_hdr *esph;
15+
__be64 seqno;
16+
int tfclen;
17+
int tailen;
18+
int plen;
19+
int clen;
20+
int len;
21+
int nfrags;
22+
__u8 proto;
23+
bool inplace;
24+
};
25+
26+
int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
27+
int esp_output_tail(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *esp);
28+
int esp_input_done2(struct sk_buff *skb, int err);
1329
#endif

0 commit comments

Comments
 (0)