<div dir="ltr"><div>The reason you need to explicitly ask for ip-protocol(6) is that sometimes, syslog-ng by itself can create such a socket, can even resolve DNS names to ipv6 addresses and then communication wouldn't work without an actual ipv6 tunnel/connectivity. Setting ip-protocol(6) everywhere would achieve auto-detection and it probably would make sense to make this configurable globally, not on a per-destination basis.</div><div><br></div><div>That would probably be something like this:</div><div><ul><li>introduce ipv6 related attributes in GlobalConfig, defaulting to ipv4<br></li><li>have those attributes configurable through cfg-grammar.y (e.g. the main configuration parser)</li><li>in each destination that supports ipv6, inherit the global value unless overridden locally</li></ul><div>There are similar patterns in the configuration/destination relation, for instance with log-fifo-size() where there's a global and a local setting as well. <br></div><div><br></div><div>With that said, I'd say that patches are welcome, I couldn't work on it myself right now, but I am happy to review any solutions.</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Sep 20, 2018 at 6:03 PM David Hauck <<a href="mailto:davidh@netacquire.com">davidh@netacquire.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Balazs,<br>
<br>
On Wednesday, September 19, 2018 9:21 PM, syslog-ng <<a href="mailto:syslog-ng-bounces@lists.balabit.hu" target="_blank">syslog-ng-bounces@lists.balabit.hu</a>> On Behalf Of Balazs Scheidler wrote:<br>
> Ip protocol v6 should support both ipv4 and v6. So if you use that and <br>
> the name resolves to a v4 address or should work.<br>
<br>
OK, interesting.<br>
<br>
For a different reason it would also be good if I could always specify ip-protocol(6) (non-default) for any value of "myhost" below - i.e., even when this is an explicit IPv4 or IPv6 address string. Would this also work? And if this were to work (I see no reason why it wouldn't if what you say about hostname resolution above) then I guess there is no value in specifying ip-protocol() at all, right (i.e., syslog-ng could also just know to do the right thing in these cases)?<br>
<br>
Thanks,<br>
-David<br>
<br>
> On Wed, Sep 19, 2018, 19:23 David Hauck <<a href="mailto:davidh@netacquire.com" target="_blank">davidh@netacquire.com</a> <mailto:<a href="mailto:davidh@netacquire.com" target="_blank">davidh@netacquire.com</a>><br>
>> wrote:<br>
> <br>
>       Hi,<br>
> <br>
>       Thought I would reach out again to see if anyone had any thoughts on the item below.<br>
> <br>
>       Thanks for the consideration,<br>
>       -David<br>
> <br>
>       On Wednesday, September 12, 2018 3:39 PM, syslog-ng <<a href="mailto:syslog-ng-bounces@lists.balabit.hu" target="_blank">syslog-ng-bounces@lists.balabit.hu</a><br>
> <mailto:<a href="mailto:syslog-ng-bounces@lists.balabit.hu" target="_blank">syslog-ng-bounces@lists.balabit.hu</a>> > On Behalf Of David Hauck<br>
> wrote:        > Hi,   >       > I have a question regarding how to specify a network<br>
> destination when using a hostname when the    > hostname can be resolved<br>
> to either IPv4 or IPv6. In particular what should be specified by the<br>
> ip-   > protocol() parameter? There are some configuration scenarios<br>
> and/or target installations that don't        > know a priori whether the DNS<br>
> configuration will resolve to an IPv4 or IPv6 address.        >       > E.g.,         >       ><br>
> destination d_tcp6 {  >     network(  >         "myhost"      >        <br>
> port(514)     >         transport(udp)        >         ip-protocol(6 or 4 or ??)<br>
>       >         );    > };    >       > It seems like it would simple enough to have<br>
> syslog-ng simply validate the resulting IP address string to  ><br>
> determine which of ip-protocol(4) or ip-protocol(6) is actually needed.<br>
> In fact, I would argue that   > specifying an IP address string (as the<br>
> "<destination-address>" value) could result in the same       > determination<br>
> (the address string necessarily unambiguously determines whether the<br>
> reference is an       > IPv4 or an IPv6 address and I would think there is a<br>
> 1-1 relationship between this determination and       > whether<br>
> ip-protocol(4) or ip-protocol(6) is used - (in other words it would<br>
> never make sense to have      > these mixed: "::1" and ip-protocol(4) would<br>
> be invalid).  >       > Thanks, -David        ><br>
______________________________________________________________________________<br>
Member info: <a href="https://lists.balabit.hu/mailman/listinfo/syslog-ng" rel="noreferrer" target="_blank">https://lists.balabit.hu/mailman/listinfo/syslog-ng</a><br>
Documentation: <a href="http://www.balabit.com/support/documentation/?product=syslog-ng" rel="noreferrer" target="_blank">http://www.balabit.com/support/documentation/?product=syslog-ng</a><br>
FAQ: <a href="http://www.balabit.com/wiki/syslog-ng-faq" rel="noreferrer" target="_blank">http://www.balabit.com/wiki/syslog-ng-faq</a><br>
<br>
</blockquote></div>