Hello, while working with PF code we've found the arg1 (flags) of pfr_create_kentry() is unused.
the patch is trivial, just in case you are interested. regards sasha ---- cut here to get patch ------ Index: pf_table.c =================================================================== RCS file: /cvs/src/sys/net/pf_table.c,v retrieving revision 1.103 diff -u -r1.103 pf_table.c --- pf_table.c 8 Sep 2014 06:24:13 -0000 1.103 +++ pf_table.c 30 Sep 2014 16:01:47 -0000 @@ -148,7 +148,7 @@ void pfr_mark_addrs(struct pfr_ktable *); struct pfr_kentry *pfr_lookup_addr(struct pfr_ktable *, struct pfr_addr *, int); -struct pfr_kentry *pfr_create_kentry(struct pfr_addr *, u_int32_t); +struct pfr_kentry *pfr_create_kentry(struct pfr_addr *); void pfr_destroy_kentries(struct pfr_kentryworkq *); void pfr_destroy_kentry(struct pfr_kentry *); void pfr_insert_kentries(struct pfr_ktable *, @@ -306,7 +306,7 @@ ad.pfra_fback = PFR_FB_NONE; } if (p == NULL && q == NULL) { - p = pfr_create_kentry(&ad, kt->pfrkt_flags); + p = pfr_create_kentry(&ad); if (p == NULL) senderr(ENOMEM); if (pfr_route_kentry(tmpkt, p)) { @@ -482,7 +482,7 @@ ad.pfra_fback = PFR_FB_DUPLICATE; goto _skip; } - p = pfr_create_kentry(&ad, kt->pfrkt_flags); + p = pfr_create_kentry(&ad); if (p == NULL) senderr(ENOMEM); if (pfr_route_kentry(tmpkt, p)) { @@ -820,7 +820,7 @@ } struct pfr_kentry * -pfr_create_kentry(struct pfr_addr *ad, u_int32_t flags) +pfr_create_kentry(struct pfr_addr *ad) { struct pfr_kentry_all *ke; @@ -917,7 +917,7 @@ p = pfr_lookup_addr(kt, ad, 1); if (p != NULL) return (0); - p = pfr_create_kentry(ad, kt->pfrkt_flags); + p = pfr_create_kentry(ad); if (p == NULL) return (EINVAL); @@ -1614,7 +1614,7 @@ senderr(EINVAL); if (pfr_lookup_addr(shadow, &ad, 1) != NULL) continue; - p = pfr_create_kentry(&ad, kt->pfrkt_flags); + p = pfr_create_kentry(&ad); if (p == NULL) senderr(ENOMEM); if (pfr_route_kentry(shadow, p)) {
Index: pf_table.c =================================================================== RCS file: /cvs/src/sys/net/pf_table.c,v retrieving revision 1.103 diff -u -r1.103 pf_table.c --- pf_table.c 8 Sep 2014 06:24:13 -0000 1.103 +++ pf_table.c 30 Sep 2014 16:01:47 -0000 @@ -148,7 +148,7 @@ void pfr_mark_addrs(struct pfr_ktable *); struct pfr_kentry *pfr_lookup_addr(struct pfr_ktable *, struct pfr_addr *, int); -struct pfr_kentry *pfr_create_kentry(struct pfr_addr *, u_int32_t); +struct pfr_kentry *pfr_create_kentry(struct pfr_addr *); void pfr_destroy_kentries(struct pfr_kentryworkq *); void pfr_destroy_kentry(struct pfr_kentry *); void pfr_insert_kentries(struct pfr_ktable *, @@ -306,7 +306,7 @@ ad.pfra_fback = PFR_FB_NONE; } if (p == NULL && q == NULL) { - p = pfr_create_kentry(&ad, kt->pfrkt_flags); + p = pfr_create_kentry(&ad); if (p == NULL) senderr(ENOMEM); if (pfr_route_kentry(tmpkt, p)) { @@ -482,7 +482,7 @@ ad.pfra_fback = PFR_FB_DUPLICATE; goto _skip; } - p = pfr_create_kentry(&ad, kt->pfrkt_flags); + p = pfr_create_kentry(&ad); if (p == NULL) senderr(ENOMEM); if (pfr_route_kentry(tmpkt, p)) { @@ -820,7 +820,7 @@ } struct pfr_kentry * -pfr_create_kentry(struct pfr_addr *ad, u_int32_t flags) +pfr_create_kentry(struct pfr_addr *ad) { struct pfr_kentry_all *ke; @@ -917,7 +917,7 @@ p = pfr_lookup_addr(kt, ad, 1); if (p != NULL) return (0); - p = pfr_create_kentry(ad, kt->pfrkt_flags); + p = pfr_create_kentry(ad); if (p == NULL) return (EINVAL); @@ -1614,7 +1614,7 @@ senderr(EINVAL); if (pfr_lookup_addr(shadow, &ad, 1) != NULL) continue; - p = pfr_create_kentry(&ad, kt->pfrkt_flags); + p = pfr_create_kentry(&ad); if (p == NULL) senderr(ENOMEM); if (pfr_route_kentry(shadow, p)) {