Skip to content

Commit

Permalink
Fix bug: duplication of authentication
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <jianhuizhao329@gmail.com>
  • Loading branch information
Jianhui Zhao committed Mar 18, 2018
1 parent 9fcb193 commit ed90f7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Empty file modified kmod/Makefile
100755 → 100644
Empty file.
5 changes: 5 additions & 0 deletions kmod/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ static u32 wifidog_hook(void *priv, struct sk_buff *skb, const struct nf_hook_st
return NF_ACCEPT;

if ((ct->status & IPS_HIJACKED) || (ct->status & IPS_ALLOWED)) {
if ((ct->status & IPS_HIJACKED) && term_is_allowed(ehdr->h_source)) {
/* Avoid duplication of authentication */
nf_reset(skb);
nf_ct_kill(ct);
}
return NF_ACCEPT;
} else if (ctinfo == IP_CT_NEW && (allowed_dest_ip(iph->daddr) || term_is_allowed(ehdr->h_source))) {
ct->status |= IPS_ALLOWED;
Expand Down

0 comments on commit ed90f7e

Please sign in to comment.