Hi!

I might have missed significant parts of the discussion,
if so please correct me.


On Fri, Sep 20, 2024 at 4:19 PM Andy Bierman <[email protected]> wrote:
>
>
>
> On Fri, Sep 20, 2024 at 9:08 AM Kent Watsen <[email protected]> wrote:
>>
>>
>> Let me clarify, I’m trying to close the "default 0” statement on the 
>> "local-port” leafs issue.  Whether rfc8407bis is updated is a secondary 
>> concern.
>>
>> Andy (and others), do you believe this (to never set “default” or 
>> “mandatory”) to be a best-practice for reusable groupings?  Or more 
>> specifically and better for me, do you think the  "default 0” statement on 
>> the "local-port” leafs is okay or should be removed (in the 
>> tcl-client-server draft)?
>>
>
> In this case, default 0 meant use whatever port you want.
> IMO that is a bad practice and should never be done.

A client normally does this, and this is explained in the
text for ietf-tcp-client.yang:

    leaf local-port {
      if-feature "local-binding-supported";
      type inet:port-number;
      default "0";
      description
        "The local IP port number to bind to for when connecting
         to the remote peer.  The port number '0', which is the
         default value, indicates that any available local port
         number may be used.";
    }

I think this is fine.

For remote-port in tcp-client it should be removed IMHO. There
is no reason to mandate every TCP client to set a default value
for the remote port.


> In this case, the default is for an application well-known port assignment, 
> so the
> groupings for the application should set the default port.

For server, I lean towards agreeing with Andy here.

If the default "0" is not refined by when the grouping is used,
a server might by mistake listen to a random port. I don't
know if this would be an issue in practice though, one would
hope that this minimal smoke test is performed before
releasing a YANG module that uses the grouping.


--
Per

_______________________________________________
netmod mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to