M. Koehrer wrote:
> Hi Jan,
> 
> accidentaly I have forgotten one file in the patch from my mail before.
> Here is the "full" patch.
> 

I had a short look, and here are some first comments:

o The saddr IP field in struct dest_route may become inconsistent when
the user changes the IP address of the referred rtdev. Why not picking
up the address from that source?

o "rtroute del" is broken as IOC_RT_NET_ROUTE_DELETE does not pass some
interface name, thus rtdev is undefined on rt_ip_route_del_host()
invocation. You need to request the source address from the user or, if
(s)he decided to omit it, pass INADDR_ANY and let rt_ip_route_del_host()
pick the first one matching the destination.

o Would you mind making all new features/function arguments selectable
via RTNET_ROUTE_CHECK_SOURCE_IP? I mean e.g. wrapping
rt_ip_route_output(&rt, dst, src) via a macro to an internal
__rt_ip_route_output() with either two or three arguments. Also the
additional struct fields should be removed in the
!RTNET_ROUTE_CHECK_SOURCE_IP case. The goal is to produce identical code
without RTNET_ROUTE_CHECK_SOURCE_IP compared to the unpatched version.
This would make it easier for me to merge it. ;)

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to