Here are some batman-adv bugfixes:
- Avoid uninitialized memory access when handling DHCP, by Sven Eckelmann - Fix check for own OGM in OGM receive handler, by Linus Luessing - Fix netif_rx access for non-interrupt context in BLA, by Jussi Kivilinna -----BEGIN PGP SIGNATURE----- iQJKBAABCgA0FiEE1ilQI7G+y+fdhnrfoSvjmEKSnqEFAl9D6JUWHHN3QHNpbW9u d3VuZGVybGljaC5kZQAKCRChK+OYQpKeoez3EADD/QxTk5CWF9jU7RnyLEmoRjGe GAoJnPbZV7GvyQADOFmrqYMvUv/4Vly8Tj8DBI3Sc8gNFNb3/jrBue/AaqXFKFh0 GFmh5MoRjzpz3xJRzOn+OxoDaC+ooeXNO3VIHNB76uTrgo1HToWrg5qtoT9KjGVT kDr0+os+9MuPh6qQKfnW79wVedYGwuDI1qb4ieHTWEyIU+A82TDYc5Zf3CqcPrlX WagIL1pNsMb7/BU9I1br9Q1ccG1cX/Icqaq/XQEiNRWsa0vjb084fKrq9jaQYalB AASDVh4aRbfJ1EatZAydX7AbmfDYPPg6THQsJAJphIJ1LBSFcv2+CMyT9Xkj1tGx 5rvMOAcO37VAv8+qwwH7DXmh3nOm2N9oglIYAGyBU3nf6rDeDntVOpraRMWr8eHt h2B+jJ9XSvowPJ4fTM86oqgxTUExYoyWHA1WkkX0VkcGXEKxpaSklSd1BcoSB707 3ItpxMYgFhLx12uZQ1bsnMuazOSer7rbpiZqmKx40uiVgyBB97d/udbNE0yh8LVM fCVwnnjNFsuKu2Qh4asvpKUhryKD/+1NOdWsrKZEJs6WAVmWJh1S3/MmZPpek0lQ pVEmf0JBp6yjfJdIgTb90UfoCRAEZ49OWmXelCjdSLx8k14j17geQxQvwcg3VGYN EsCTj4Ls2DsHpabhBQ== =ikYK -----END PGP SIGNATURE----- Merge tag 'batadv-net-for-davem-20200824' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are some batman-adv bugfixes: - Avoid uninitialized memory access when handling DHCP, by Sven Eckelmann - Fix check for own OGM in OGM receive handler, by Linus Luessing - Fix netif_rx access for non-interrupt context in BLA, by Jussi Kivilinna ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
99408c422d
@ -881,6 +881,12 @@ static void batadv_v_ogm_process(const struct sk_buff *skb, int ogm_offset,
|
||||
ntohl(ogm_packet->seqno), ogm_throughput, ogm_packet->ttl,
|
||||
ogm_packet->version, ntohs(ogm_packet->tvlv_len));
|
||||
|
||||
if (batadv_is_my_mac(bat_priv, ogm_packet->orig)) {
|
||||
batadv_dbg(BATADV_DBG_BATMAN, bat_priv,
|
||||
"Drop packet: originator packet from ourself\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* If the throughput metric is 0, immediately drop the packet. No need
|
||||
* to create orig_node / neigh_node for an unusable route.
|
||||
*/
|
||||
@ -1008,11 +1014,6 @@ int batadv_v_ogm_packet_recv(struct sk_buff *skb,
|
||||
if (batadv_is_my_mac(bat_priv, ethhdr->h_source))
|
||||
goto free_skb;
|
||||
|
||||
ogm_packet = (struct batadv_ogm2_packet *)skb->data;
|
||||
|
||||
if (batadv_is_my_mac(bat_priv, ogm_packet->orig))
|
||||
goto free_skb;
|
||||
|
||||
batadv_inc_counter(bat_priv, BATADV_CNT_MGMT_RX);
|
||||
batadv_add_counter(bat_priv, BATADV_CNT_MGMT_RX_BYTES,
|
||||
skb->len + ETH_HLEN);
|
||||
|
@ -437,7 +437,10 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, u8 *mac,
|
||||
batadv_add_counter(bat_priv, BATADV_CNT_RX_BYTES,
|
||||
skb->len + ETH_HLEN);
|
||||
|
||||
netif_rx(skb);
|
||||
if (in_interrupt())
|
||||
netif_rx(skb);
|
||||
else
|
||||
netif_rx_ni(skb);
|
||||
out:
|
||||
if (primary_if)
|
||||
batadv_hardif_put(primary_if);
|
||||
|
@ -703,8 +703,10 @@ batadv_gw_dhcp_recipient_get(struct sk_buff *skb, unsigned int *header_len,
|
||||
|
||||
chaddr_offset = *header_len + BATADV_DHCP_CHADDR_OFFSET;
|
||||
/* store the client address if the message is going to a client */
|
||||
if (ret == BATADV_DHCP_TO_CLIENT &&
|
||||
pskb_may_pull(skb, chaddr_offset + ETH_ALEN)) {
|
||||
if (ret == BATADV_DHCP_TO_CLIENT) {
|
||||
if (!pskb_may_pull(skb, chaddr_offset + ETH_ALEN))
|
||||
return BATADV_DHCP_NO;
|
||||
|
||||
/* check if the DHCP packet carries an Ethernet DHCP */
|
||||
p = skb->data + *header_len + BATADV_DHCP_HTYPE_OFFSET;
|
||||
if (*p != BATADV_DHCP_HTYPE_ETHERNET)
|
||||
|
Loading…
x
Reference in New Issue
Block a user