Merge branch 'amt-fix-several-bugs'
Taehee Yoo says: ==================== amt: fix several bugs This patchset fixes several bugs in amt module First patch fixes typo. Second patch fixes wrong return value of amt_update_handler(). A relay finds a tunnel if it receives an update message from the gateway. If it can't find a tunnel, amt_update_handler() should return an error, not success. But it always returns success. Third patch fixes a possible memory leak in amt_rcv(). A skb would not be freed if an amt interface doesn't have a socket. ==================== Link: https://lore.kernel.org/r/20220523161708.29518-1-ap420073@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
1679ea99bc
@ -57,7 +57,7 @@ static char *type_str[] = {
|
||||
"AMT_MSG_MEMBERSHIP_QUERY",
|
||||
"AMT_MSG_MEMBERSHIP_UPDATE",
|
||||
"AMT_MSG_MULTICAST_DATA",
|
||||
"AMT_MSG_TEARDOWM",
|
||||
"AMT_MSG_TEARDOWN",
|
||||
};
|
||||
|
||||
static char *action_str[] = {
|
||||
@ -2423,7 +2423,7 @@ static bool amt_update_handler(struct amt_dev *amt, struct sk_buff *skb)
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return true;
|
||||
|
||||
report:
|
||||
iph = ip_hdr(skb);
|
||||
@ -2679,7 +2679,7 @@ static int amt_rcv(struct sock *sk, struct sk_buff *skb)
|
||||
amt = rcu_dereference_sk_user_data(sk);
|
||||
if (!amt) {
|
||||
err = true;
|
||||
goto out;
|
||||
goto drop;
|
||||
}
|
||||
|
||||
skb->dev = amt->dev;
|
||||
|
@ -15,7 +15,7 @@ enum amt_msg_type {
|
||||
AMT_MSG_MEMBERSHIP_QUERY,
|
||||
AMT_MSG_MEMBERSHIP_UPDATE,
|
||||
AMT_MSG_MULTICAST_DATA,
|
||||
AMT_MSG_TEARDOWM,
|
||||
AMT_MSG_TEARDOWN,
|
||||
__AMT_MSG_MAX,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user