On Mon, Oct 26, 2015 at 12:46 AM, Patrik Flykt <patrik.fl...@linux.intel.com
> wrote:

> On Fri, 2015-10-23 at 06:28 -0700, Naveen Singh wrote:
> > > I didn't notice sin_port being used anywhere, so this is not needed?
> > >
> > This is being used in current code so I decided to follow the current
> > code. In send_packet look for following line:
> > addr.sin_port = htons(123);
>
> Mmmkay. But the port sent to is a constant (123), so it need not be
> explicitely rembered. On the receiving end one needs to check the server
> address so that some other whimsical device sending data to ConnMan can
> be ignored.
>
Yes the receive path does that check anyway.
When we call send_packet from start_ntp we pass the sockaddr as
timeserver_addr (which is used for sending ntp request packet) I
initialized the port number. Please have a look in the patch that I am
sending

>
> Cheers,
>
>         Patrik
>
>
> _______________________________________________
> connman mailing list
> connman@connman.net
> https://lists.connman.net/mailman/listinfo/connman
>
_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to