diff options
author | fenner <fenner@FreeBSD.org> | 2002-07-30 04:49:13 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 2002-07-30 04:49:13 +0000 |
commit | 83c61fd14f767e44be00b8629b2cd47d38f0bd59 (patch) | |
tree | e588a33a64434bef4f31927b20022520b8644e11 /contrib/traceroute | |
parent | 82b18a4bfe88114e39260d80800476d91272b7b4 (diff) | |
download | FreeBSD-src-83c61fd14f767e44be00b8629b2cd47d38f0bd59.zip FreeBSD-src-83c61fd14f767e44be00b8629b2cd47d38f0bd59.tar.gz |
Routing socket messages are padded to sizeof(long), not just
sizeof(u_int32_t).
Diffstat (limited to 'contrib/traceroute')
-rw-r--r-- | contrib/traceroute/findsaddr-socket.c | 6 |
1 files changed, 4 insertions, 2 deletions
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!"); |