Date: Tue, 13 Nov 2001 00:51:10 +0000 From: "Aaron Scarisbrick" <aaronsca@hotmail.com> To: edwin@mavetju.org Cc: freebsd-questions@freebsd.org Subject: Re: syslogd bug/feature Message-ID: <F204nDyNdauuNi4kysR0000eeba@hotmail.com>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_5dab_78a1_1d17 Content-Type: text/plain; format=flowed I was hoping someone already fixed it. Anyway, the problem stems from converting the mask length to a subnet mask. Correct me if I'm wrong, but for a mask length of zero, you don't need to do any conversions. This is what the attached patch effectively does, and it appears to work. -Aaron ----Original Message Follows---- From: Edwin Groothuis <edwin@mavetju.org> To: Aaron Scarisbrick <aaronsca@hotmail.com> CC: freebsd-questions@freebsd.org Subject: Re: syslogd bug/feature Date: Tue, 13 Nov 2001 11:03:55 +1100 On Mon, Nov 12, 2001 at 11:41:47PM +0000, Aaron Scarisbrick wrote: > I was trying to get syslogd (FreeBSD 4.2-RELEASE) to accept all incoming > messages (no really, I have a good reason why), and couldn't get it to > accept 0.0.0.0/0 as accept from any IP. An IP address of 0.0.0.0 with a > mask of 0 means any IP address to me, but syslogd interprets it as 0.0.0.0 > with a mask of 255.255.255.255: > > [root@test1]# syslogd -d -a 0.0.0.0/0 > allowaddr: rule 0: numeric, addr = 0.0.0.0, mask = 255.255.255.255; port = > 514 > off & running.... > > Is this by design or accident? What is the proper syntax for syslogd to > accept messages from any IP? You can use "syslogd -d -a 0.0.0.0/0.0.0.0" and maybe supply a patch to solve the problem? Edwin -- Edwin Groothuis | Personal website: http://www.MavEtJu.org edwin@mavetju.org | Interested in MUDs? Visit Fatal Dimensions: ------------------+ http://www.FatalDimensions.org/ _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp ------=_NextPart_000_5dab_78a1_1d17 Content-Type: application/octet-stream; name="syslogd.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="syslogd.patch" LS0tIHN5c2xvZ2QuYy5vcmlnCVR1ZSBOb3YgMTMgMDA6NDc6NTEgMjAwMQor Kysgc3lzbG9nZC5jCVR1ZSBOb3YgMTMgMDA6NDg6MDAgMjAwMQpAQCAtMTc3 OCw3ICsxNzc4LDExIEBACiAJCQlpZiAoaSA8IDAgfHwgaSA+IDMyKQogCQkJ CXJldHVybiAtMTsKIAkJCS8qIGNvbnZlcnQgbWFza2xlbiB0byBuZXRtYXNr ICovCi0JCQlhcC5hX21hc2suc19hZGRyID0gaHRvbmwofigoMSA8PCAoMzIg LSBpKSkgLSAxKSk7CisJCQlpZiAoaSA9PSAwICkgeworCQkJCWFwLmFfbWFz ay5zX2FkZHIgPSAwOworCQkJfSBlbHNlIHsKKwkJCQlhcC5hX21hc2suc19h ZGRyID0gaHRvbmwofigoMSA8PCAoMzIgLSBpKSkgLSAxKSk7CisJCQl9CiAJ CX0KIAkJaWYgKGFzY2lpMmFkZHIoQUZfSU5FVCwgcywgJmFwLmFfYWRkcikg PT0gLTEpCiAJCQlyZXR1cm4gLTE7Cg== ------=_NextPart_000_5dab_78a1_1d17-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F204nDyNdauuNi4kysR0000eeba>