|
@@ -2645,9 +2645,9 @@ static int process_ipsec(struct pktgen_dev *pkt_dev,
|
|
struct xfrm_state *x = pkt_dev->flows[pkt_dev->curfl].x;
|
|
struct xfrm_state *x = pkt_dev->flows[pkt_dev->curfl].x;
|
|
int nhead = 0;
|
|
int nhead = 0;
|
|
if (x) {
|
|
if (x) {
|
|
- int ret;
|
|
|
|
- __u8 *eth;
|
|
|
|
|
|
+ struct ethhdr *eth;
|
|
struct iphdr *iph;
|
|
struct iphdr *iph;
|
|
|
|
+ int ret;
|
|
|
|
|
|
nhead = x->props.header_len - skb_headroom(skb);
|
|
nhead = x->props.header_len - skb_headroom(skb);
|
|
if (nhead > 0) {
|
|
if (nhead > 0) {
|
|
@@ -2667,9 +2667,9 @@ static int process_ipsec(struct pktgen_dev *pkt_dev,
|
|
goto err;
|
|
goto err;
|
|
}
|
|
}
|
|
/* restore ll */
|
|
/* restore ll */
|
|
- eth = (__u8 *) skb_push(skb, ETH_HLEN);
|
|
|
|
- memcpy(eth, pkt_dev->hh, 12);
|
|
|
|
- *(u16 *) ð[12] = protocol;
|
|
|
|
|
|
+ eth = (struct ethhdr *)skb_push(skb, ETH_HLEN);
|
|
|
|
+ memcpy(eth, pkt_dev->hh, 2 * ETH_ALEN);
|
|
|
|
+ eth->h_proto = protocol;
|
|
|
|
|
|
/* Update IPv4 header len as well as checksum value */
|
|
/* Update IPv4 header len as well as checksum value */
|
|
iph = ip_hdr(skb);
|
|
iph = ip_hdr(skb);
|