Date: Tue, 14 Jul 2009 18:30:16 GMT From: Ana Kukec <anchie@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 166094 for review Message-ID: <200907141830.n6EIUGQm028207@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=166094 Change 166094 by anchie@anchie_malimis on 2009/07/14 18:30:10 In RTM_SND message, rtm->rtm_addrs is set to 0, but routing message is still checked against rti_info[RTAX_DST] == NULL. Skip this check in case of RTM_SND message. Affected files ... .. //depot/projects/soc2009/anchie_send/src/sys/net/rtsock.c#7 edit Differences ... ==== //depot/projects/soc2009/anchie_send/src/sys/net/rtsock.c#7 (text+ko) ==== @@ -501,11 +501,15 @@ senderr(EINVAL); } info.rti_flags = rtm->rtm_flags; - if (info.rti_info[RTAX_DST] == NULL || - info.rti_info[RTAX_DST]->sa_family >= AF_MAX || - (info.rti_info[RTAX_GATEWAY] != NULL && - info.rti_info[RTAX_GATEWAY]->sa_family >= AF_MAX)) - senderr(EINVAL); + if (rtm->rtm_type != RTM_SND) { + if (info.rti_info[RTAX_DST] == NULL || + info.rti_info[RTAX_DST]->sa_family >= AF_MAX || + (info.rti_info[RTAX_GATEWAY] != NULL && + info.rti_info[RTAX_GATEWAY]->sa_family >= AF_MAX)) { + printf("EINVAL 3"); + senderr(EINVAL); + } + } /* * Verify that the caller has the appropriate privilege; RTM_GET * is the only operation the non-superuser is allowed. @@ -519,6 +523,9 @@ switch (rtm->rtm_type) { struct rtentry *saved_nrt; + case RTM_SND: + printf("RTM_SND!"); + case RTM_ADD: if (info.rti_info[RTAX_GATEWAY] == NULL) senderr(EINVAL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907141830.n6EIUGQm028207>