Hello,

resending to better alias as recommended by p...@benzedrine.cx subscribers.

regards
sasha

----- Forwarded message from Alexandr Nedvedicky 
<alexandr.nedvedi...@oracle.com> -----

From: Alexandr Nedvedicky <alexandr.nedvedi...@oracle.com>
To: p...@benzedrine.cx
Subject: unused argument at pf_translate() function

Hello,

I'm not sure the alias is right place to submit patches.

Lint on Solaris complains there is unused argument `m` in function
pf_translate(). Patch below makes lint silent. The cvs-diff is against
the CURRENT branch.

kind regards
sasha

-------- cut here to get patch ----------


Index: if_pflog.c
===================================================================
RCS file: /cvs/src/sys/net/if_pflog.c,v
retrieving revision 1.58
diff -u -r1.58 if_pflog.c
--- if_pflog.c  16 Nov 2013 00:36:01 -0000      1.58
+++ if_pflog.c  10 Jun 2014 15:32:13 -0000
@@ -440,7 +440,7 @@
        if (pd.virtual_proto != PF_VPROTO_FRAGMENT &&
            (pfloghdr->rewritten = pf_translate(&pd, &pfloghdr->saddr,
            pfloghdr->sport, &pfloghdr->daddr, pfloghdr->dport, 0,
-           pfloghdr->dir, pd.m))) {
+           pfloghdr->dir))) {
                m_copyback(pd.m, pd.off, min(pd.m->m_len - pd.off, pd.hdrlen),
                    pd.hdr.any, M_NOWAIT);
 #if INET && INET6
Index: pf.c
===================================================================
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.878
diff -u -r1.878 pf.c
--- pf.c        20 May 2014 11:03:13 -0000      1.878
+++ pf.c        10 Jun 2014 15:32:13 -0000
@@ -3417,7 +3417,7 @@
                            sk->port[pd->af == pd->naf ? pd->sidx : pd->didx],
                            &sk->addr[pd->af == pd->naf ? pd->didx : pd->sidx],
                            sk->port[pd->af == pd->naf ? pd->didx : pd->sidx],
-                           virtual_type, icmp_dir, pd->m);
+                           virtual_type, icmp_dir);
                }
        } else {
                while ((ri = SLIST_FIRST(&rules))) {
@@ -3657,7 +3657,7 @@
 int
 pf_translate(struct pf_pdesc *pd, struct pf_addr *saddr, u_int16_t sport,
     struct pf_addr *daddr, u_int16_t dport, u_int16_t virtual_type,
-    int icmp_dir, struct mbuf *m)
+    int icmp_dir)
 {
        /*
         * when called from bpf_mtap_pflog, there are extra constraints:
Index: pfvar.h
===================================================================
RCS file: /cvs/src/sys/net/pfvar.h,v
retrieving revision 1.399
diff -u -r1.399 pfvar.h
--- pfvar.h     22 Apr 2014 14:41:03 -0000      1.399
+++ pfvar.h     10 Jun 2014 15:32:13 -0000
@@ -1840,7 +1840,7 @@
 void   pf_pkt_addr_changed(struct mbuf *);
 int    pf_state_key_attach(struct pf_state_key *, struct pf_state *, int);
 int    pf_translate(struct pf_pdesc *, struct pf_addr *, u_int16_t,
-           struct pf_addr *, u_int16_t, u_int16_t, int, struct mbuf *);
+           struct pf_addr *, u_int16_t, u_int16_t, int);
 int    pf_translate_af(struct pf_pdesc *);
 void   pf_route(struct mbuf **, struct pf_rule *, int,
            struct ifnet *, struct pf_state *);


Index: if_pflog.c
===================================================================
RCS file: /cvs/src/sys/net/if_pflog.c,v
retrieving revision 1.58
diff -u -r1.58 if_pflog.c
--- if_pflog.c  16 Nov 2013 00:36:01 -0000      1.58
+++ if_pflog.c  10 Jun 2014 15:32:13 -0000
@@ -440,7 +440,7 @@
        if (pd.virtual_proto != PF_VPROTO_FRAGMENT &&
            (pfloghdr->rewritten = pf_translate(&pd, &pfloghdr->saddr,
            pfloghdr->sport, &pfloghdr->daddr, pfloghdr->dport, 0,
-           pfloghdr->dir, pd.m))) {
+           pfloghdr->dir))) {
                m_copyback(pd.m, pd.off, min(pd.m->m_len - pd.off, pd.hdrlen),
                    pd.hdr.any, M_NOWAIT);
 #if INET && INET6
Index: pf.c
===================================================================
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.878
diff -u -r1.878 pf.c
--- pf.c        20 May 2014 11:03:13 -0000      1.878
+++ pf.c        10 Jun 2014 15:32:13 -0000
@@ -3417,7 +3417,7 @@
                            sk->port[pd->af == pd->naf ? pd->sidx : pd->didx],
                            &sk->addr[pd->af == pd->naf ? pd->didx : pd->sidx],
                            sk->port[pd->af == pd->naf ? pd->didx : pd->sidx],
-                           virtual_type, icmp_dir, pd->m);
+                           virtual_type, icmp_dir);
                }
        } else {
                while ((ri = SLIST_FIRST(&rules))) {
@@ -3657,7 +3657,7 @@
 int
 pf_translate(struct pf_pdesc *pd, struct pf_addr *saddr, u_int16_t sport,
     struct pf_addr *daddr, u_int16_t dport, u_int16_t virtual_type,
-    int icmp_dir, struct mbuf *m)
+    int icmp_dir)
 {
        /*
         * when called from bpf_mtap_pflog, there are extra constraints:
Index: pfvar.h
===================================================================
RCS file: /cvs/src/sys/net/pfvar.h,v
retrieving revision 1.399
diff -u -r1.399 pfvar.h
--- pfvar.h     22 Apr 2014 14:41:03 -0000      1.399
+++ pfvar.h     10 Jun 2014 15:32:13 -0000
@@ -1840,7 +1840,7 @@
 void   pf_pkt_addr_changed(struct mbuf *);
 int    pf_state_key_attach(struct pf_state_key *, struct pf_state *, int);
 int    pf_translate(struct pf_pdesc *, struct pf_addr *, u_int16_t,
-           struct pf_addr *, u_int16_t, u_int16_t, int, struct mbuf *);
+           struct pf_addr *, u_int16_t, u_int16_t, int);
 int    pf_translate_af(struct pf_pdesc *);
 void   pf_route(struct mbuf **, struct pf_rule *, int,
            struct ifnet *, struct pf_state *);


----- End forwarded message -----
Index: if_pflog.c
===================================================================
RCS file: /cvs/src/sys/net/if_pflog.c,v
retrieving revision 1.58
diff -u -r1.58 if_pflog.c
--- if_pflog.c  16 Nov 2013 00:36:01 -0000      1.58
+++ if_pflog.c  10 Jun 2014 15:32:13 -0000
@@ -440,7 +440,7 @@
        if (pd.virtual_proto != PF_VPROTO_FRAGMENT &&
            (pfloghdr->rewritten = pf_translate(&pd, &pfloghdr->saddr,
            pfloghdr->sport, &pfloghdr->daddr, pfloghdr->dport, 0,
-           pfloghdr->dir, pd.m))) {
+           pfloghdr->dir))) {
                m_copyback(pd.m, pd.off, min(pd.m->m_len - pd.off, pd.hdrlen),
                    pd.hdr.any, M_NOWAIT);
 #if INET && INET6
Index: pf.c
===================================================================
RCS file: /cvs/src/sys/net/pf.c,v
retrieving revision 1.878
diff -u -r1.878 pf.c
--- pf.c        20 May 2014 11:03:13 -0000      1.878
+++ pf.c        10 Jun 2014 15:32:13 -0000
@@ -3417,7 +3417,7 @@
                            sk->port[pd->af == pd->naf ? pd->sidx : pd->didx],
                            &sk->addr[pd->af == pd->naf ? pd->didx : pd->sidx],
                            sk->port[pd->af == pd->naf ? pd->didx : pd->sidx],
-                           virtual_type, icmp_dir, pd->m);
+                           virtual_type, icmp_dir);
                }
        } else {
                while ((ri = SLIST_FIRST(&rules))) {
@@ -3657,7 +3657,7 @@
 int
 pf_translate(struct pf_pdesc *pd, struct pf_addr *saddr, u_int16_t sport,
     struct pf_addr *daddr, u_int16_t dport, u_int16_t virtual_type,
-    int icmp_dir, struct mbuf *m)
+    int icmp_dir)
 {
        /*
         * when called from bpf_mtap_pflog, there are extra constraints:
Index: pfvar.h
===================================================================
RCS file: /cvs/src/sys/net/pfvar.h,v
retrieving revision 1.399
diff -u -r1.399 pfvar.h
--- pfvar.h     22 Apr 2014 14:41:03 -0000      1.399
+++ pfvar.h     10 Jun 2014 15:32:13 -0000
@@ -1840,7 +1840,7 @@
 void   pf_pkt_addr_changed(struct mbuf *);
 int    pf_state_key_attach(struct pf_state_key *, struct pf_state *, int);
 int    pf_translate(struct pf_pdesc *, struct pf_addr *, u_int16_t,
-           struct pf_addr *, u_int16_t, u_int16_t, int, struct mbuf *);
+           struct pf_addr *, u_int16_t, u_int16_t, int);
 int    pf_translate_af(struct pf_pdesc *);
 void   pf_route(struct mbuf **, struct pf_rule *, int,
            struct ifnet *, struct pf_state *);

Reply via email to