[SLOF] [PATCH] ipv6: Add support for sending packets through a router
Thomas Huth
thuth at redhat.com
Mon Apr 11 18:01:10 AEST 2016
On 11.04.2016 06:51, Nikunj A Dadhania wrote:
> Thomas Huth <thuth at redhat.com> writes:
>
>> The network boot over IPv6 currently fails if the TFTP server
>> is not in the same subnet as the SLOF client. In that case we
>> have to fill in the MAC address of a router into our packets
>> to get them to the right place.
>>
>> Signed-off-by: Thomas Huth <thuth at redhat.com>
>
> Looks good, one small nit below.
>
> Reviewed-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
Thanks for the review!
>> +/**
>> + * Find a router for a given host address
>> + * @param ip - IPv6 address with the prefered prefix
>> + * @return pointer to router, or NULL if none is available
>> + */
>> +struct router *ipv6_get_default_router(ip6_addr_t *ip)
>
> Did you think of returning mac-address directly?
>
> ipv6_get_default_router_mac() ?
That's maybe a tiny little bit easier for this case, but I think if we
ever need any information from the "struct router" of the default router
again in another part of the code, it's better to have a function like
this (i.e. returning the whole structure). So I'd prefer to keep the
code this way.
Thomas
More information about the SLOF
mailing list