extensions: split assignments and if-exprs

This commit is contained in:
Jan Engelhardt
2020-10-25 15:41:24 +01:00
parent 939d3ee0d3
commit bfb0516c79
8 changed files with 22 additions and 15 deletions

View File

@@ -972,7 +972,8 @@ static bool pknock_mt(const struct sk_buff *skb,
/* Sets, updates, removes or checks the peer matching status. */
if (info->option & XT_PKNOCK_KNOCKPORT) {
if ((ret = is_allowed(peer))) {
ret = is_allowed(peer);
if (ret != 0) {
if (info->option & XT_PKNOCK_CLOSESECRET &&
(iph->protocol == IPPROTO_UDP ||
iph->protocol == IPPROTO_UDPLITE))