Updated from Linux LTS 3.10.19 to 3.10.20
This commit is contained in:
@@ -61,6 +61,7 @@ static int __init batadv_init(void)
|
||||
batadv_recv_handler_init();
|
||||
|
||||
batadv_iv_init();
|
||||
batadv_nc_init();
|
||||
|
||||
batadv_event_workqueue = create_singlethread_workqueue("bat_events");
|
||||
|
||||
@@ -138,7 +139,7 @@ int batadv_mesh_init(struct net_device *soft_iface)
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
ret = batadv_nc_init(bat_priv);
|
||||
ret = batadv_nc_mesh_init(bat_priv);
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
@@ -163,7 +164,7 @@ void batadv_mesh_free(struct net_device *soft_iface)
|
||||
batadv_vis_quit(bat_priv);
|
||||
|
||||
batadv_gw_node_purge(bat_priv);
|
||||
batadv_nc_free(bat_priv);
|
||||
batadv_nc_mesh_free(bat_priv);
|
||||
batadv_dat_free(bat_priv);
|
||||
batadv_bla_free(bat_priv);
|
||||
|
||||
|
||||
@@ -34,6 +34,20 @@ static void batadv_nc_worker(struct work_struct *work);
|
||||
static int batadv_nc_recv_coded_packet(struct sk_buff *skb,
|
||||
struct batadv_hard_iface *recv_if);
|
||||
|
||||
/**
|
||||
* batadv_nc_init - one-time initialization for network coding
|
||||
*/
|
||||
int __init batadv_nc_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Register our packet type */
|
||||
ret = batadv_recv_handler_register(BATADV_CODED,
|
||||
batadv_nc_recv_coded_packet);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* batadv_nc_start_timer - initialise the nc periodic worker
|
||||
* @bat_priv: the bat priv with all the soft interface information
|
||||
@@ -45,10 +59,10 @@ static void batadv_nc_start_timer(struct batadv_priv *bat_priv)
|
||||
}
|
||||
|
||||
/**
|
||||
* batadv_nc_init - initialise coding hash table and start house keeping
|
||||
* batadv_nc_mesh_init - initialise coding hash table and start house keeping
|
||||
* @bat_priv: the bat priv with all the soft interface information
|
||||
*/
|
||||
int batadv_nc_init(struct batadv_priv *bat_priv)
|
||||
int batadv_nc_mesh_init(struct batadv_priv *bat_priv)
|
||||
{
|
||||
bat_priv->nc.timestamp_fwd_flush = jiffies;
|
||||
bat_priv->nc.timestamp_sniffed_purge = jiffies;
|
||||
@@ -70,11 +84,6 @@ int batadv_nc_init(struct batadv_priv *bat_priv)
|
||||
batadv_hash_set_lock_class(bat_priv->nc.coding_hash,
|
||||
&batadv_nc_decoding_hash_lock_class_key);
|
||||
|
||||
/* Register our packet type */
|
||||
if (batadv_recv_handler_register(BATADV_CODED,
|
||||
batadv_nc_recv_coded_packet) < 0)
|
||||
goto err;
|
||||
|
||||
INIT_DELAYED_WORK(&bat_priv->nc.work, batadv_nc_worker);
|
||||
batadv_nc_start_timer(bat_priv);
|
||||
|
||||
@@ -1722,12 +1731,11 @@ free_nc_packet:
|
||||
}
|
||||
|
||||
/**
|
||||
* batadv_nc_free - clean up network coding memory
|
||||
* batadv_nc_mesh_free - clean up network coding memory
|
||||
* @bat_priv: the bat priv with all the soft interface information
|
||||
*/
|
||||
void batadv_nc_free(struct batadv_priv *bat_priv)
|
||||
void batadv_nc_mesh_free(struct batadv_priv *bat_priv)
|
||||
{
|
||||
batadv_recv_handler_unregister(BATADV_CODED);
|
||||
cancel_delayed_work_sync(&bat_priv->nc.work);
|
||||
|
||||
batadv_nc_purge_paths(bat_priv, bat_priv->nc.coding_hash, NULL);
|
||||
|
||||
@@ -22,8 +22,9 @@
|
||||
|
||||
#ifdef CONFIG_BATMAN_ADV_NC
|
||||
|
||||
int batadv_nc_init(struct batadv_priv *bat_priv);
|
||||
void batadv_nc_free(struct batadv_priv *bat_priv);
|
||||
int batadv_nc_init(void);
|
||||
int batadv_nc_mesh_init(struct batadv_priv *bat_priv);
|
||||
void batadv_nc_mesh_free(struct batadv_priv *bat_priv);
|
||||
void batadv_nc_update_nc_node(struct batadv_priv *bat_priv,
|
||||
struct batadv_orig_node *orig_node,
|
||||
struct batadv_orig_node *orig_neigh_node,
|
||||
@@ -47,12 +48,17 @@ int batadv_nc_init_debugfs(struct batadv_priv *bat_priv);
|
||||
|
||||
#else /* ifdef CONFIG_BATMAN_ADV_NC */
|
||||
|
||||
static inline int batadv_nc_init(struct batadv_priv *bat_priv)
|
||||
static inline int batadv_nc_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void batadv_nc_free(struct batadv_priv *bat_priv)
|
||||
static inline int batadv_nc_mesh_init(struct batadv_priv *bat_priv)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void batadv_nc_mesh_free(struct batadv_priv *bat_priv)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ static int ipgre_rcv(struct sk_buff *skb)
|
||||
iph->saddr, iph->daddr, tpi.key);
|
||||
|
||||
if (tunnel) {
|
||||
ip_tunnel_rcv(tunnel, skb, &tpi, log_ecn_error);
|
||||
ip_tunnel_rcv(tunnel, skb, &tpi, hdr_len, log_ecn_error);
|
||||
return 0;
|
||||
}
|
||||
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
|
||||
|
||||
@@ -402,7 +402,7 @@ static struct ip_tunnel *ip_tunnel_create(struct net *net,
|
||||
}
|
||||
|
||||
int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
|
||||
const struct tnl_ptk_info *tpi, bool log_ecn_error)
|
||||
const struct tnl_ptk_info *tpi, int hdr_len, bool log_ecn_error)
|
||||
{
|
||||
struct pcpu_tstats *tstats;
|
||||
const struct iphdr *iph = ip_hdr(skb);
|
||||
@@ -413,7 +413,7 @@ int ip_tunnel_rcv(struct ip_tunnel *tunnel, struct sk_buff *skb,
|
||||
skb->protocol = tpi->proto;
|
||||
|
||||
skb->mac_header = skb->network_header;
|
||||
__pskb_pull(skb, tunnel->hlen);
|
||||
__pskb_pull(skb, hdr_len);
|
||||
skb_postpull_rcsum(skb, skb_transport_header(skb), tunnel->hlen);
|
||||
#ifdef CONFIG_NET_IPGRE_BROADCAST
|
||||
if (ipv4_is_multicast(iph->daddr)) {
|
||||
|
||||
@@ -195,7 +195,7 @@ static int ipip_rcv(struct sk_buff *skb)
|
||||
if (tunnel) {
|
||||
if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb))
|
||||
goto drop;
|
||||
return ip_tunnel_rcv(tunnel, skb, &tpi, log_ecn_error);
|
||||
return ip_tunnel_rcv(tunnel, skb, &tpi, 0, log_ecn_error);
|
||||
}
|
||||
|
||||
return -1;
|
||||
|
||||
@@ -1084,10 +1084,13 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie)
|
||||
if (rt->rt6i_genid != rt_genid(dev_net(rt->dst.dev)))
|
||||
return NULL;
|
||||
|
||||
if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie))
|
||||
return dst;
|
||||
if (!rt->rt6i_node || (rt->rt6i_node->fn_sernum != cookie))
|
||||
return NULL;
|
||||
|
||||
return NULL;
|
||||
if (rt6_check_expired(rt))
|
||||
return NULL;
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
||||
static struct dst_entry *ip6_negative_advice(struct dst_entry *dst)
|
||||
|
||||
Reference in New Issue
Block a user