Date: Sun, 24 Nov 2019 13:53:37 +0000 (UTC) From: Kristof Provost <kp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355054 - head/sys/netpfil/pf Message-ID: <201911241353.xAODrbTh001057@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kp Date: Sun Nov 24 13:53:36 2019 New Revision: 355054 URL: https://svnweb.freebsd.org/changeset/base/355054 Log: pf: Add endline to all DPFPRINTF() DPFPRINTF() doesn't automatically add an endline, so be consistent and always add it. Modified: head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Sun Nov 24 12:35:16 2019 (r355053) +++ head/sys/netpfil/pf/pf.c Sun Nov 24 13:53:36 2019 (r355054) @@ -3755,7 +3755,8 @@ pf_create_state(struct pf_rule *r, struct pf_rule *nr, &s->src, &s->dst, rewrite)) { /* This really shouldn't happen!!! */ DPFPRINTF(PF_DEBUG_URGENT, - ("pf_normalize_tcp_stateful failed on first pkt")); + ("pf_normalize_tcp_stateful failed on first " + "pkt\n")); pf_normalize_tcp_cleanup(s); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Sun Nov 24 12:35:16 2019 (r355053) +++ head/sys/netpfil/pf/pf_norm.c Sun Nov 24 13:53:36 2019 (r355054) @@ -550,25 +550,25 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct /* No empty fragments. */ if (frent->fe_len == 0) { - DPFPRINTF(("bad fragment: len 0")); + DPFPRINTF(("bad fragment: len 0\n")); goto bad_fragment; } /* All fragments are 8 byte aligned. */ if (frent->fe_mff && (frent->fe_len & 0x7)) { - DPFPRINTF(("bad fragment: mff and len %d", frent->fe_len)); + DPFPRINTF(("bad fragment: mff and len %d\n", frent->fe_len)); goto bad_fragment; } /* Respect maximum length, IP_MAXPACKET == IPV6_MAXPACKET. */ if (frent->fe_off + frent->fe_len > IP_MAXPACKET) { - DPFPRINTF(("bad fragment: max packet %d", + DPFPRINTF(("bad fragment: max packet %d\n", frent->fe_off + frent->fe_len)); goto bad_fragment; } DPFPRINTF((key->frc_af == AF_INET ? - "reass frag %d @ %d-%d" : "reass frag %#08x @ %d-%d", + "reass frag %d @ %d-%d\n" : "reass frag %#08x @ %d-%d\n", key->frc_id, frent->fe_off, frent->fe_off + frent->fe_len)); /* Fully buffer all of the fragments in this fragment queue. */ @@ -642,7 +642,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct precut = prev->fe_off + prev->fe_len - frent->fe_off; if (precut >= frent->fe_len) goto bad_fragment; - DPFPRINTF(("overlap -%d", precut)); + DPFPRINTF(("overlap -%d\n", precut)); m_adj(frent->fe_m, precut); frent->fe_off += precut; frent->fe_len -= precut; @@ -653,7 +653,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct uint16_t aftercut; aftercut = frent->fe_off + frent->fe_len - after->fe_off; - DPFPRINTF(("adjust overlap %d", aftercut)); + DPFPRINTF(("adjust overlap %d\n", aftercut)); if (aftercut < after->fe_len) { m_adj(after->fe_m, aftercut); after->fe_off += aftercut; @@ -670,7 +670,7 @@ pf_fillup_fragment(struct pf_fragment_cmp *key, struct /* If part of the queue gets too long, there is not way to recover. */ if (pf_frent_insert(frag, frent, prev)) { - DPFPRINTF(("fragment queue limit exceeded")); + DPFPRINTF(("fragment queue limit exceeded\n")); goto bad_fragment; } @@ -744,7 +744,7 @@ pf_reassemble(struct mbuf **m0, struct ip *ip, int dir m = *m0 = NULL; if (frag->fr_holes) { - DPFPRINTF(("frag %d, holes %d", frag->fr_id, frag->fr_holes)); + DPFPRINTF(("frag %d, holes %d\n", frag->fr_id, frag->fr_holes)); return (PF_PASS); /* drop because *m0 is NULL, no error */ } @@ -771,7 +771,7 @@ pf_reassemble(struct mbuf **m0, struct ip *ip, int dir ip->ip_off &= ~(IP_MF|IP_OFFMASK); if (hdrlen + total > IP_MAXPACKET) { - DPFPRINTF(("drop: too big: %d", total)); + DPFPRINTF(("drop: too big: %d\n", total)); ip->ip_len = 0; REASON_SET(reason, PFRES_SHORT); /* PF_DROP requires a valid mbuf *m0 in pf_test() */ @@ -830,7 +830,8 @@ pf_reassemble6(struct mbuf **m0, struct ip6_hdr *ip6, m = *m0 = NULL; if (frag->fr_holes) { - DPFPRINTF(("frag %d, holes %d", frag->fr_id, frag->fr_holes)); + DPFPRINTF(("frag %d, holes %d\n", frag->fr_id, + frag->fr_holes)); PF_FRAG_UNLOCK(); return (PF_PASS); /* Drop because *m0 is NULL, no error. */ } @@ -891,14 +892,14 @@ pf_reassemble6(struct mbuf **m0, struct ip6_hdr *ip6, ip6->ip6_nxt = proto; if (hdrlen - sizeof(struct ip6_hdr) + total > IPV6_MAXPACKET) { - DPFPRINTF(("drop: too big: %d", total)); + DPFPRINTF(("drop: too big: %d\n", total)); ip6->ip6_plen = 0; REASON_SET(reason, PFRES_SHORT); /* PF_DROP requires a valid mbuf *m0 in pf_test6(). */ return (PF_DROP); } - DPFPRINTF(("complete: %p(%d)", m, ntohs(ip6->ip6_plen))); + DPFPRINTF(("complete: %p(%d)\n", m, ntohs(ip6->ip6_plen))); return (PF_PASS); fail: @@ -967,7 +968,7 @@ pf_refragment6(struct ifnet *ifp, struct mbuf **m0, st action = PF_PASS; } else { /* Drop expects an mbuf to free. */ - DPFPRINTF(("refragment error %d", error)); + DPFPRINTF(("refragment error %d\n", error)); action = PF_DROP; } for (t = m; m; m = t) { @@ -1572,7 +1573,7 @@ pf_normalize_tcp_stateful(struct mbuf *m, int off, str if (got_ts) { /* Huh? Multiple timestamps!? */ if (V_pf_status.debug >= PF_DEBUG_MISC) { - DPFPRINTF(("multiple TS??")); + DPFPRINTF(("multiple TS??\n")); pf_print_state(state); printf("\n"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911241353.xAODrbTh001057>