Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/ldpd send the actual prefix on the wire instead of ...
details: https://anonhg.NetBSD.org/src/rev/2b98ae60db15
branches: trunk
changeset: 787952:2b98ae60db15
user: kefren <kefren%NetBSD.org@localhost>
date: Tue Jul 16 19:40:01 2013 +0000
description:
send the actual prefix on the wire instead of struct headers
statify
diffstat:
usr.sbin/ldpd/tlv_stack.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 4f21b6f8bcac -r 2b98ae60db15 usr.sbin/ldpd/tlv_stack.c
--- a/usr.sbin/ldpd/tlv_stack.c Tue Jul 16 19:07:54 2013 +0000
+++ b/usr.sbin/ldpd/tlv_stack.c Tue Jul 16 19:40:01 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tlv_stack.c,v 1.8 2013/07/11 10:46:19 kefren Exp $ */
+/* $NetBSD: tlv_stack.c,v 1.9 2013/07/16 19:40:01 kefren Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -47,9 +47,9 @@
#include "mpls_interface.h"
#include "tlv_stack.h"
-uint8_t ldp_ceil8(int);
+static uint8_t ldp_ceil8(int);
-uint8_t
+static uint8_t
ldp_ceil8(int x)
{
if (x % 8 == 0)
@@ -285,7 +285,8 @@
p->type = FEC_PREFIX;
p->af = htons(LDP_AF_INET);
p->prelen = prefixlen;
- memcpy(&p->prefix, addr, ldp_ceil8(prefixlen));
+ memcpy(&p->prefix, & ((const struct sockaddr_in*)addr)->sin_addr,
+ ldp_ceil8(prefixlen));
/* LABEL TLV */
l = (struct label_tlv *) ((unsigned char *) p +
Home |
Main Index |
Thread Index |
Old Index