Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143952
b: refs/heads/master
c: 50b2ff1
h: refs/heads/master
v: v3
  • Loading branch information
Paul Moore authored and David S. Miller committed Apr 22, 2009
1 parent e11fd56 commit 861e0b7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cef309cf6112f9a44b1ebcefc1641d01d35c83dc
refs/heads/master: 50b2ff1bc47baacb8e9882b2b2a74b240ddbeecf
26 changes: 10 additions & 16 deletions trunk/net/netlabel/netlabel_addrlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,13 +256,11 @@ struct netlbl_af4list *netlbl_af4list_remove(__be32 addr, __be32 mask,
{
struct netlbl_af4list *entry;

entry = netlbl_af4list_search(addr, head);
if (entry != NULL && entry->addr == addr && entry->mask == mask) {
netlbl_af4list_remove_entry(entry);
return entry;
}

return NULL;
entry = netlbl_af4list_search_exact(addr, mask, head);
if (entry == NULL)
return NULL;
netlbl_af4list_remove_entry(entry);
return entry;
}

#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
Expand Down Expand Up @@ -299,15 +297,11 @@ struct netlbl_af6list *netlbl_af6list_remove(const struct in6_addr *addr,
{
struct netlbl_af6list *entry;

entry = netlbl_af6list_search(addr, head);
if (entry != NULL &&
ipv6_addr_equal(&entry->addr, addr) &&
ipv6_addr_equal(&entry->mask, mask)) {
netlbl_af6list_remove_entry(entry);
return entry;
}

return NULL;
entry = netlbl_af6list_search_exact(addr, mask, head);
if (entry == NULL)
return NULL;
netlbl_af6list_remove_entry(entry);
return entry;
}
#endif /* IPv6 */

Expand Down

0 comments on commit 861e0b7

Please sign in to comment.