Commit 21fde749 authored by Frank Blaschka's avatar Frank Blaschka Committed by David S. Miller

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: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fe7a2625
...@@ -763,7 +763,8 @@ static inline int qeth_get_micros(void) ...@@ -763,7 +763,8 @@ static inline int qeth_get_micros(void)
static inline int qeth_get_ip_version(struct sk_buff *skb) static inline int qeth_get_ip_version(struct sk_buff *skb)
{ {
switch (skb->protocol) { struct ethhdr *ehdr = (struct ethhdr *)skb->data;
switch (ehdr->h_proto) {
case ETH_P_IPV6: case ETH_P_IPV6:
return 6; return 6;
case ETH_P_IP: case ETH_P_IP:
......
...@@ -2900,10 +2900,8 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2900,10 +2900,8 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
int data_offset = -1; int data_offset = -1;
int nr_frags; int nr_frags;
if ((card->info.type == QETH_CARD_TYPE_IQD) && if (((card->info.type == QETH_CARD_TYPE_IQD) && (!ipv)) ||
(((skb->protocol != htons(ETH_P_IPV6)) && card->options.sniffer)
(skb->protocol != htons(ETH_P_IP))) ||
card->options.sniffer))
goto tx_drop; goto tx_drop;
if ((card->state != CARD_STATE_UP) || !card->lan_online) { if ((card->state != CARD_STATE_UP) || !card->lan_online) {
...@@ -2949,14 +2947,14 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2949,14 +2947,14 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (data_offset < 0) if (data_offset < 0)
skb_pull(new_skb, ETH_HLEN); skb_pull(new_skb, ETH_HLEN);
} else { } else {
if (new_skb->protocol == htons(ETH_P_IP)) { if (ipv == 4) {
if (card->dev->type == ARPHRD_IEEE802_TR) if (card->dev->type == ARPHRD_IEEE802_TR)
skb_pull(new_skb, TR_HLEN); skb_pull(new_skb, TR_HLEN);
else else
skb_pull(new_skb, ETH_HLEN); skb_pull(new_skb, ETH_HLEN);
} }
if (new_skb->protocol == ETH_P_IPV6 && card->vlangrp && if (ipv == 6 && card->vlangrp &&
vlan_tx_tag_present(new_skb)) { vlan_tx_tag_present(new_skb)) {
skb_push(new_skb, VLAN_HLEN); skb_push(new_skb, VLAN_HLEN);
skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment