gtp: don't care if GTP socket is not yet ready in gtp_dev_xmit()
If we receive any packet, it will be just ignored. I don't find any reason to prematurely drop this in the xmit patch.
This commit is contained in:
parent
e29789755f
commit
4e93f63f6f
7
gtp.c
7
gtp.c
|
@ -637,19 +637,12 @@ gtp_push_ip6hdr(struct sk_buff *skb, struct gtp_pktinfo *pktinfo)
|
||||||
|
|
||||||
static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
static netdev_tx_t gtp_dev_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||||
{
|
{
|
||||||
struct gtp_instance *gti = netdev_priv(dev);
|
|
||||||
struct udphdr *uh;
|
struct udphdr *uh;
|
||||||
unsigned int payload_len;
|
unsigned int payload_len;
|
||||||
struct gtp_pktinfo pktinfo;
|
struct gtp_pktinfo pktinfo;
|
||||||
unsigned int proto = ntohs(skb->protocol);
|
unsigned int proto = ntohs(skb->protocol);
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* UDP socket not initialized, skip */
|
|
||||||
if (!gti->sock0) {
|
|
||||||
pr_info("xmit: no socket / need cfg, skipping\n");
|
|
||||||
return NETDEV_TX_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
switch (proto) {
|
switch (proto) {
|
||||||
case ETH_P_IP:
|
case ETH_P_IP:
|
||||||
|
|
Loading…
Reference in New Issue