Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

qeth: l3 send dhcp in non pass thru mode

dhcp frames are valid IPv4 packets so there is no need to send them
in pass thru mode. This allows dhcp packets to pass HiperSockets.
Also the dhcp release frame is send out correctly with this patch.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Frank Blaschka and committed by
David S. Miller
21fde749 fe7a2625

+6 -7
+2 -1
drivers/s390/net/qeth_core.h
··· 763 763 764 764 static inline int qeth_get_ip_version(struct sk_buff *skb) 765 765 { 766 - switch (skb->protocol) { 766 + struct ethhdr *ehdr = (struct ethhdr *)skb->data; 767 + switch (ehdr->h_proto) { 767 768 case ETH_P_IPV6: 768 769 return 6; 769 770 case ETH_P_IP:
+4 -6
drivers/s390/net/qeth_l3_main.c
··· 2900 2900 int data_offset = -1; 2901 2901 int nr_frags; 2902 2902 2903 - if ((card->info.type == QETH_CARD_TYPE_IQD) && 2904 - (((skb->protocol != htons(ETH_P_IPV6)) && 2905 - (skb->protocol != htons(ETH_P_IP))) || 2906 - card->options.sniffer)) 2903 + if (((card->info.type == QETH_CARD_TYPE_IQD) && (!ipv)) || 2904 + card->options.sniffer) 2907 2905 goto tx_drop; 2908 2906 2909 2907 if ((card->state != CARD_STATE_UP) || !card->lan_online) { ··· 2947 2949 if (data_offset < 0) 2948 2950 skb_pull(new_skb, ETH_HLEN); 2949 2951 } else { 2950 - if (new_skb->protocol == htons(ETH_P_IP)) { 2952 + if (ipv == 4) { 2951 2953 if (card->dev->type == ARPHRD_IEEE802_TR) 2952 2954 skb_pull(new_skb, TR_HLEN); 2953 2955 else 2954 2956 skb_pull(new_skb, ETH_HLEN); 2955 2957 } 2956 2958 2957 - if (new_skb->protocol == ETH_P_IPV6 && card->vlangrp && 2959 + if (ipv == 6 && card->vlangrp && 2958 2960 vlan_tx_tag_present(new_skb)) { 2959 2961 skb_push(new_skb, VLAN_HLEN); 2960 2962 skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4);