From 83c61fd14f767e44be00b8629b2cd47d38f0bd59 Mon Sep 17 00:00:00 2001 From: fenner Date: Tue, 30 Jul 2002 04:49:13 +0000 Subject: Routing socket messages are padded to sizeof(long), not just sizeof(u_int32_t). --- contrib/traceroute/findsaddr-socket.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'contrib/traceroute') diff --git a/contrib/traceroute/findsaddr-socket.c b/contrib/traceroute/findsaddr-socket.c index 39c8134..5a79d4f 100644 --- a/contrib/traceroute/findsaddr-socket.c +++ b/contrib/traceroute/findsaddr-socket.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ /* XXX Yes this is WAY too complicated */ @@ -193,9 +195,9 @@ findsaddr(register const struct sockaddr_in *to, } if (SALEN(sa) == 0) - cp += sizeof(u_int32_t); + cp += sizeof(long); else - cp += roundup(SALEN(sa), sizeof(u_int32_t)); + cp += roundup(SALEN(sa), sizeof(long)); } return ("failed!"); -- cgit v1.1