hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/include/net/esp.h
....@@ -11,6 +11,22 @@
1111 return (struct ip_esp_hdr *)skb_transport_header(skb);
1212 }
1313
14
+static inline void esp_output_fill_trailer(u8 *tail, int tfclen, int plen, __u8 proto)
15
+{
16
+ /* Fill padding... */
17
+ if (tfclen) {
18
+ memset(tail, 0, tfclen);
19
+ tail += tfclen;
20
+ }
21
+ do {
22
+ int i;
23
+ for (i = 0; i < plen - 2; i++)
24
+ tail[i] = i + 1;
25
+ } while (0);
26
+ tail[plen - 2] = plen - 2;
27
+ tail[plen - 1] = proto;
28
+}
29
+
1430 struct esp_info {
1531 struct ip_esp_hdr *esph;
1632 __be64 seqno;