Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Warning: getservbyport() expects parameter 1 to be integer, string given in /etc/inc/filter_log.inc on line 447

    Scheduled Pinned Locked Moved Development
    8 Posts 2 Posters 631 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pete35
      last edited by pete35

      pfsense 2.4.5RC from Sunday, while filtering firewall log entries on pass entries gives a warning:

      Warning: getservbyport() expects parameter 1 to be integer, string given in /etc/inc/filter_log.inc on line 447

      a1811ef4-2603-4da5-9c05-a341e6672937-image.png

      <a href="https://carsonlam.ca">bintang88</a>
      <a href="https://carsonlam.ca">slot88</a>

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        I can't reproduce that here. It looks like it might be triggered by a specific message in your filter log.

        If you can still reproduce this, look at the raw filter log (clog /var/log/filter.log on 2.4.x) and see if anything obviously stands out as being different/not belonging.

        Or you can attach a copy of the filter.log file

        Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • P
          pete35
          last edited by

          @jimp said in Warning: getservbyport() expects parameter 1 to be integer, string given in /etc/inc/filter_log.inc on line 447:

          clog /var/log/filter.log

          I can reproduce it every time. No special entries in the filter log. I got a crash rport on the main page, same warnings.

          <a href="https://carsonlam.ca">bintang88</a>
          <a href="https://carsonlam.ca">slot88</a>

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            The error line it mentions is when the log entries to show on the page are being displayed, not when applying the filter. So it must be from a log entry. Can you attach the log file here, or send it to me privately ( <my forum username> (a) netgate (dot) com )

            Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • jimpJ
              jimp Rebel Alliance Developer Netgate
              last edited by

              OK, it is a bad entry in your log. Specifically, this one:

              Feb 11 17:24:57 pfsense filterlog: 4294967295,,,0,ix0,short,pass,in,4,0x0,,54,23350,0,none,6,tcp,26,x.x.x.x,y.y.y.y,errormsg='tcp 6 [bad hdr length 0 - too short < 20]',
              

              Normally that would be getting tossed out since it wouldn't parse, but it's not being rejected as expected. Now that I can reproduce it, I can look into a fix.

              Thanks!

              Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

              Need help fast? Netgate Global Support!

              Do not Chat/PM for help!

              1 Reply Last reply Reply Quote 0
              • P
                pete35
                last edited by

                @jimp said in Warning: getservbyport() expects parameter 1 to be integer, string given in /etc/inc/filter_log.inc on line 447:

                4294967295

                Feb 11 17:24:57 pfsense filterlog: 4294967295,,,0,ix0,short,pass,in,4,0x0,,54,23350,0,none,6,tcp,26,89.163.224.233,x.x.x.x,errormsg='tcp 6 [bad hdr length 0 - too short < 20]',

                look at this we had the same offendig IP at another pfense, there was a pass in the firewall log !

                https://forum.netgate.com/topic/150449/firewall-log-seltsamer-pass-eintrag

                <a href="https://carsonlam.ca">bintang88</a>
                <a href="https://carsonlam.ca">slot88</a>

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  @pete35 said in Warning: getservbyport() expects parameter 1 to be integer, string given in /etc/inc/filter_log.inc on line 447:

                  look at this we had the same offendig IP at another pfense, there was a pass in the firewall log !

                  I wouldn't worry about it. The last time one of these short log entries came up I looked through the code and it was actually dropped:

                  https://forum.netgate.com/topic/147248/had-my-pfsense-been-compromised/72

                  Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    I opened an issue and pushed a fix for the PHP error: https://redmine.pfsense.org/issues/10255

                    Remember: Upvote with the ๐Ÿ‘ button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.