CVS commit: src/sbin/route
Module Name:src Committed By: kefren Date: Wed Jul 24 06:28:10 UTC 2013 Modified Files: src/sbin/route: route.8 Log Message: Add -tag description as suggested in PR/45071 To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sbin/route/route.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/route/route.8 diff -u src/sbin/route/route.8:1.47 src/sbin/route/route.8:1.48 --- src/sbin/route/route.8:1.47 Fri Mar 1 18:25:17 2013 +++ src/sbin/route/route.8 Wed Jul 24 06:28:10 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: route.8,v 1.47 2013/03/01 18:25:17 joerg Exp $ +.\ $NetBSD: route.8,v 1.48 2013/07/24 06:28:10 kefren Exp $ .\ .\ Copyright (c) 1983, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)route.8 8.4 (Berkeley) 6/1/94 .\ -.Dd February 5, 2013 +.Dd July 24, 2013 .Dt ROUTE 8 .Os .Sh NAME @@ -242,11 +242,16 @@ or are specified as link-level addresses and the names must be numeric specifications rather than symbolic names. .Pp -The optional modifiers -.Fl mpls -and +The optional modifier .Fl tag -specify that all subsequent addresses are in the +specifies an address associated to the route. +How the address is used is specific to the address family of +the destination and the interface used to forward the packet. +Currently route tags are consumed only by the +.Xr mpls 4 +stack, therefore +.Nm +assumes that the subsequent addresses are in the .Tn MPLS address family. See
CVS commit: src/share/man/man4
Module Name:src Committed By: kefren Date: Wed Jul 24 06:31:09 UTC 2013 Modified Files: src/share/man/man4: mpls.4 Log Message: EXP - TC document RFC4182 sysctl flag document a little bit more the IMPLNULL operation To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/mpls.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/mpls.4 diff -u src/share/man/man4/mpls.4:1.7 src/share/man/man4/mpls.4:1.8 --- src/share/man/man4/mpls.4:1.7 Sun Jul 17 23:50:05 2011 +++ src/share/man/man4/mpls.4 Wed Jul 24 06:31:09 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: mpls.4,v 1.7 2011/07/17 23:50:05 dholland Exp $ +.\ $NetBSD: mpls.4,v 1.8 2013/07/24 06:31:09 kefren Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -24,7 +24,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd June 29, 2010 +.Dd July 24, 2013 .Dt MPLS 4 .Os .Sh NAME @@ -70,7 +70,7 @@ In network bit order: .Bd -literal --- | || || -| Label | Exp. | BoS | TTL| +| Label | TC | BoS | TTL| | 20 bits | 3 bits | 1 bit | 8 bits | | || || --- @@ -79,13 +79,16 @@ In network bit order: .It Label 20 bits representing FEC, consequently the only information used to forward the frame to next-hop -.It Experimental -3 bits that are sometimes used for specifying a type of service +.It Traffic Class Field +3 bits that are used for specifying a traffic class, usually used for defining +a type of service. +This field was named the Experimental Field in most early (pre- +.%R RFC 5462 +) documents. .It Bottom of Stack -1 bit that is set for the last entry in the shim -stack and 0 for all others. -This way, multiple labels can -be prepended to a single packet. +One bit that is set for the last entry in the shim stack and 0 for all others. +An MPLS frame may contain more than one shim, the last one before the +network headers being marked by setting the BoS bit. .It TTL 8 bits, representing Time to Live, decremented at every LSR. .El @@ -109,20 +112,22 @@ will be copied into IP header on decapsu The IPv6 version of the above. .It Li net.mpls.inet_map_prec If set, precedence field from IP header will be -mapped into MPLS shim EXP bits on encapsulation, and the MPLS EXP +mapped into MPLS shim in TC field on encapsulation, and the MPLS TC field will be copied into IP Precedence field on decapsulation. .It Li net.mpls.inet6_map_prec The IPv6 version of the above. .It Li net.mpls.icmp_respond Returns ICMP TTL exceeded in transit when an MPLS frame is dropped because of TTL = 0 on egress interface. +.It Li net.mpls.rfc4182 +Pop the Explicit Null labels as specified by +.%R RFC 4182 .El In order to encapsulate and decapsulate to and from MPLS, an mpls pseudo-interface must be created and packets that should be encapsulated must be routed to that interface. .Pp -.Dq Pure -MPLS routes can be created using +MPLS routes may be created using .Dv AF_MPLS .Li sa_family sockaddrs for destination and tag fields. @@ -143,6 +148,14 @@ and .Xr route 8 utilities should be used to manage routes from userland. .Pp +The +.Nx +implementation stores route tagging information into a sockaddr_mpls structure +that is referenced by the rt_tag field of rtentry struct. +For storing multiple labels associated with the next-hop, the current +implementation abuses the sockaddr_mpls structure, extending it in order to fit +a stack of labels. +.Pp .Xr ldpd 8 should be used in order to automatically import, manage and distribute labels among LSRs in the same MPLS domain. @@ -171,6 +184,13 @@ When an LSR would otherwise replace the with a new label, but the new label is .Dq Implicit NULL , the LSR will pop the stack instead of doing the replacement. +In this case, the LSR will have to deduce by itself what is the original +address family of the encapsulated network packet. +Currently, +.Nx +implementation is assuming that the latter address family +is equal to the next-hop address family specified in the Implicit Null Label +MPLS route. .El .Sh EXAMPLES .Bl -enum @@ -245,6 +265,14 @@ and forward the result to 192.168.1.100 .%R RFC 3032 .%T MPLS Label Stack Encoding .Re +.Rs +.%R RFC 4182 +.%T Removing a Restriction on the use of MPLS Explicit NULL +.Re +.Rs +.%R RFC 5462 +.%T MPLS Label Stack Entry: EXP Field Renamed to Traffic Class Field +.Re .Sh HISTORY The .Nm
CVS commit: src/games/fortune/datfiles
Module Name:src Committed By: wiz Date: Wed Jul 24 06:57:09 UTC 2013 Modified Files: src/games/fortune/datfiles: fortunes2 Log Message: Fix typo. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/games/fortune/datfiles/fortunes2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/datfiles/fortunes2 diff -u src/games/fortune/datfiles/fortunes2:1.48 src/games/fortune/datfiles/fortunes2:1.49 --- src/games/fortune/datfiles/fortunes2:1.48 Wed Jul 24 04:41:49 2013 +++ src/games/fortune/datfiles/fortunes2 Wed Jul 24 06:57:09 2013 @@ -55516,7 +55516,7 @@ If you think you can do a thing or think -- Henry Ford % A man who is master of himself can end a sorrow as easily as he -can invent a pleasure. I dont want to be at the mercy of my +can invent a pleasure. I don't want to be at the mercy of my emotions. I want to use them, to enjoy them, and to dominate them. -- Oscar Wilde %
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Wed Jul 24 07:00:16 UTC 2013 Modified Files: src/share/man/man4: mpls.4 Log Message: Only use .%R inside Rs/Re. Improve spacing. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/share/man/man4/mpls.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/mpls.4 diff -u src/share/man/man4/mpls.4:1.8 src/share/man/man4/mpls.4:1.9 --- src/share/man/man4/mpls.4:1.8 Wed Jul 24 06:31:09 2013 +++ src/share/man/man4/mpls.4 Wed Jul 24 07:00:16 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: mpls.4,v 1.8 2013/07/24 06:31:09 kefren Exp $ +.\ $NetBSD: mpls.4,v 1.9 2013/07/24 07:00:16 wiz Exp $ .\ .\ Copyright (c) 2010 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -82,9 +82,9 @@ used to forward the frame to next-hop .It Traffic Class Field 3 bits that are used for specifying a traffic class, usually used for defining a type of service. -This field was named the Experimental Field in most early (pre- -.%R RFC 5462 -) documents. +This field was named the Experimental Field in most early +.Pf ( pre- Ns Li RFC 5462 ) +documents. .It Bottom of Stack One bit that is set for the last entry in the shim stack and 0 for all others. An MPLS frame may contain more than one shim, the last one before the @@ -121,7 +121,7 @@ Returns ICMP TTL exceeded in transit whe frame is dropped because of TTL = 0 on egress interface. .It Li net.mpls.rfc4182 Pop the Explicit Null labels as specified by -.%R RFC 4182 +.Li RFC 4182 .El In order to encapsulate and decapsulate to and from MPLS, an mpls pseudo-interface must be created and packets that should be encapsulated
CVS commit: src/usr.sbin/ldpd
Module Name:src Committed By: kefren Date: Wed Jul 24 09:05:53 UTC 2013 Modified Files: src/usr.sbin/ldpd: label.c label.h mpls_interface.c mpls_routes.c Log Message: * use a flag in label struct in order to determine if we should treat the associated routes using RTF_HOST * clean the mess in flush_mpls_routes that could result in accessing uninitialized memory To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/ldpd/label.c cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/ldpd/label.h cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/ldpd/mpls_interface.c cvs rdiff -u -r1.19 -r1.20 src/usr.sbin/ldpd/mpls_routes.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ldpd/label.c diff -u src/usr.sbin/ldpd/label.c:1.9 src/usr.sbin/ldpd/label.c:1.10 --- src/usr.sbin/ldpd/label.c:1.9 Thu Jul 18 11:45:36 2013 +++ src/usr.sbin/ldpd/label.c Wed Jul 24 09:05:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: label.c,v 1.9 2013/07/18 11:45:36 kefren Exp $ */ +/* $NetBSD: label.c,v 1.10 2013/07/24 09:05:53 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -55,7 +55,7 @@ label_init() struct label * label_add(const union sockunion * so_dest, const union sockunion * so_pref, const union sockunion * so_gate, uint32_t binding, - const struct ldp_peer * p, uint32_t label) + const struct ldp_peer * p, uint32_t label, bool host) { struct label *l; char spreftmp[INET_ADDRSTRLEN]; @@ -83,6 +83,7 @@ label_add(const union sockunion * so_des l-binding = get_free_local_label(); l-p = p; l-label = label; + l-host = host; SLIST_INSERT_HEAD(label_head, l, labels); @@ -125,12 +126,13 @@ label_reattach_route(struct label *l, in if (readd == REATT_INET_CHANGE) { /* Delete the tagged route and re-add IPv4 route */ delete_route(l-so_dest, - l-so_pref.sa.sa_len != 0 ? l-so_pref : NULL, NO_FREESO); + l-host ? NULL : l-so_pref, NO_FREESO); add_route(l-so_dest, - l-so_pref.sa.sa_len != 0 ? l-so_pref : NULL, l-so_gate, + l-host ? NULL : l-so_pref, l-so_gate, NULL, NULL, NO_FREESO, RTM_READD); } else if (readd == REATT_INET_DEL) - delete_route(l-so_dest, l-so_pref, NO_FREESO); + delete_route(l-so_dest, l-host ? NULL : l-so_pref, + NO_FREESO); /* Deletes the MPLS route */ if (l-binding = min_label) Index: src/usr.sbin/ldpd/label.h diff -u src/usr.sbin/ldpd/label.h:1.6 src/usr.sbin/ldpd/label.h:1.7 --- src/usr.sbin/ldpd/label.h:1.6 Thu Jul 18 11:45:36 2013 +++ src/usr.sbin/ldpd/label.h Wed Jul 24 09:05:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: label.h,v 1.6 2013/07/18 11:45:36 kefren Exp $ */ +/* $NetBSD: label.h,v 1.7 2013/07/24 09:05:53 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -51,6 +51,7 @@ struct label { union sockunion so_dest, so_pref, so_gate; int binding, label; + bool host; /* change routes using RTF_HOST */ const struct ldp_peer *p; SLIST_ENTRY(label) labels; }; @@ -58,7 +59,8 @@ SLIST_HEAD(,label) label_head; voidlabel_init(void); struct label * label_add(const union sockunion *, const union sockunion *, - const union sockunion *, uint32_t, const struct ldp_peer *, uint32_t); + const union sockunion *, uint32_t, const struct ldp_peer *, uint32_t, + bool); voidlabel_del(struct label *); voiddel_all_peer_labels(const struct ldp_peer*, int); void label_reattach_all_peer_labels(const struct ldp_peer*, int); Index: src/usr.sbin/ldpd/mpls_interface.c diff -u src/usr.sbin/ldpd/mpls_interface.c:1.11 src/usr.sbin/ldpd/mpls_interface.c:1.12 --- src/usr.sbin/ldpd/mpls_interface.c:1.11 Thu Jul 18 11:45:36 2013 +++ src/usr.sbin/ldpd/mpls_interface.c Wed Jul 24 09:05:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mpls_interface.c,v 1.11 2013/07/18 11:45:36 kefren Exp $ */ +/* $NetBSD: mpls_interface.c,v 1.12 2013/07/24 09:05:53 kefren Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -138,24 +138,9 @@ mpls_add_label(struct label *lab) fatalp(Out of memory\n); return LDP_E_MEMORY; } -/* - if (so_oldifa != NULL) { - so_ifa = malloc(sizeof(*so_ifa)); - if (so_ifa == NULL) { - free(so_dest); - if (so_pref != NULL) -free(so_pref); - free(so_tag); - free(so_nexthop); - fatalp(Out of memory\n); - return LDP_E_MEMORY; - } - memcpy(so_ifa, so_oldifa, so_oldifa-sa.sa_len); - } else - so_ifa = NULL; -*/ - if (add_route(lab-so_dest, lab-so_pref, lab-so_gate, so_ifa, - so_tag, NO_FREESO, RTM_CHANGE) != LDP_E_OK) { + + if (add_route(lab-so_dest, lab-host ? NULL : lab-so_pref, + lab-so_gate, so_ifa, so_tag, NO_FREESO, RTM_CHANGE) != LDP_E_OK){ free(so_tag); fatalp([mpls_add_label]: INET route failure\n); return LDP_E_ROUTE_ERROR; Index: src/usr.sbin/ldpd/mpls_routes.c diff -u src/usr.sbin/ldpd/mpls_routes.c:1.19 src/usr.sbin/ldpd/mpls_routes.c:1.20 --- src/usr.sbin/ldpd/mpls_routes.c:1.19
CVS commit: src/lib/libc/sys
Module Name:src Committed By: skrll Date: Wed Jul 24 11:42:51 UTC 2013 Modified Files: src/lib/libc/sys: msgrcv.2 msgsnd.2 Log Message: Clarify msgsz. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/lib/libc/sys/msgrcv.2 cvs rdiff -u -r1.18 -r1.19 src/lib/libc/sys/msgsnd.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/msgrcv.2 diff -u src/lib/libc/sys/msgrcv.2:1.20 src/lib/libc/sys/msgrcv.2:1.21 --- src/lib/libc/sys/msgrcv.2:1.20 Tue May 15 11:37:01 2012 +++ src/lib/libc/sys/msgrcv.2 Wed Jul 24 11:42:50 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: msgrcv.2,v 1.20 2012/05/15 11:37:01 reinoud Exp $ +.\ $NetBSD: msgrcv.2,v 1.21 2013/07/24 11:42:50 skrll Exp $ .\ .\ Copyright (c) 1995 Frank van der Linden .\ All rights reserved. @@ -90,8 +90,10 @@ less than or equal to the absolute value will be received. .El .Pp +The argument .Fa msgsz -specifies the maximum length of the requested message. +specifies the size in bytes of +.Va mtext . If the received message has a length greater than .Fa msgsz it will be silently truncated if the Index: src/lib/libc/sys/msgsnd.2 diff -u src/lib/libc/sys/msgsnd.2:1.18 src/lib/libc/sys/msgsnd.2:1.19 --- src/lib/libc/sys/msgsnd.2:1.18 Fri Apr 30 04:06:20 2010 +++ src/lib/libc/sys/msgsnd.2 Wed Jul 24 11:42:50 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: msgsnd.2,v 1.18 2010/04/30 04:06:20 jruoho Exp $ +.\ $NetBSD: msgsnd.2,v 1.19 2013/07/24 11:42:50 skrll Exp $ .\ .\ Copyright (c) 1995 Frank van der Linden .\ All rights reserved. @@ -69,7 +69,9 @@ be used for selecting messages (see .Xr msgrcv 2 ) . The .Va mtext -field is an array of bytes, with size up to the system limit +field is an array of bytes of length +.Fa msgsz , +with size up to the system limit .Dv MSGMAX . .Pp If the number of bytes already on the message queue plus
CVS commit: src/tests
Module Name:src Committed By: skrll Date: Wed Jul 24 11:44:10 UTC 2013 Modified Files: src/tests/kernel: t_sysv.c src/tests/lib/libc/sys: t_msgrcv.c Log Message: Fix msgsz confusion. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/t_sysv.c cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_msgrcv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/kernel/t_sysv.c diff -u src/tests/kernel/t_sysv.c:1.2 src/tests/kernel/t_sysv.c:1.3 --- src/tests/kernel/t_sysv.c:1.2 Tue Nov 6 18:31:53 2012 +++ src/tests/kernel/t_sysv.c Wed Jul 24 11:44:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: t_sysv.c,v 1.2 2012/11/06 18:31:53 pgoyette Exp $ */ +/* $NetBSD: t_sysv.c,v 1.3 2013/07/24 11:44:10 skrll Exp $ */ /*- * Copyright (c) 1999, 2007 The NetBSD Foundation, Inc. @@ -252,11 +252,11 @@ ATF_TC_BODY(msg, tc) */ m.mtype = MTYPE_1; strcpy(m.mtext, m1_str); - ATF_REQUIRE_MSG(msgsnd(sender_msqid, m, sizeof(m), 0) != -1, - sender: msgsnd 1: %d, errno); + ATF_REQUIRE_MSG(msgsnd(sender_msqid, m, MESSAGE_TEXT_LEN, + 0) != -1, sender: msgsnd 1: %d, errno); - ATF_REQUIRE_MSG(msgrcv(sender_msqid, m, sizeof(m), - MTYPE_1_ACK, 0) == sizeof(m), + ATF_REQUIRE_MSG(msgrcv(sender_msqid, m, MESSAGE_TEXT_LEN, + MTYPE_1_ACK, 0) == MESSAGE_TEXT_LEN, sender: msgrcv 1 ack: %d, errno); print_msqid_ds(m_ds, 0600); @@ -266,11 +266,11 @@ ATF_TC_BODY(msg, tc) */ m.mtype = MTYPE_2; strcpy(m.mtext, m2_str); - ATF_REQUIRE_MSG(msgsnd(sender_msqid, m, sizeof(m), 0) != -1, + ATF_REQUIRE_MSG(msgsnd(sender_msqid, m, MESSAGE_TEXT_LEN, 0) != -1, sender: msgsnd 2: %d, errno); - ATF_REQUIRE_MSG(msgrcv(sender_msqid, m, sizeof(m), - MTYPE_2_ACK, 0) == sizeof(m), + ATF_REQUIRE_MSG(msgrcv(sender_msqid, m, MESSAGE_TEXT_LEN, + MTYPE_2_ACK, 0) == MESSAGE_TEXT_LEN, sender: msgrcv 2 ack: %d, errno); } @@ -361,7 +361,7 @@ receiver() /* * Receive the first message, print it, and send an ACK. */ - if (msgrcv(msqid, m, sizeof(m), MTYPE_1, 0) != sizeof(m)) + if (msgrcv(msqid, m, MESSAGE_TEXT_LEN, MTYPE_1, 0) != MESSAGE_TEXT_LEN) err(1, receiver: msgrcv 1); printf(%s\n, m.mtext); @@ -370,14 +370,14 @@ receiver() m.mtype = MTYPE_1_ACK; - if (msgsnd(msqid, m, sizeof(m), 0) == -1) + if (msgsnd(msqid, m, MESSAGE_TEXT_LEN, 0) == -1) err(1, receiver: msgsnd ack 1); /* * Receive the second message, print it, and send an ACK. */ - if (msgrcv(msqid, m, sizeof(m), MTYPE_2, 0) != sizeof(m)) + if (msgrcv(msqid, m, MESSAGE_TEXT_LEN, MTYPE_2, 0) != MESSAGE_TEXT_LEN) err(1, receiver: msgrcv 2); printf(%s\n, m.mtext); @@ -386,7 +386,7 @@ receiver() m.mtype = MTYPE_2_ACK; - if (msgsnd(msqid, m, sizeof(m), 0) == -1) + if (msgsnd(msqid, m, MESSAGE_TEXT_LEN, 0) == -1) err(1, receiver: msgsnd ack 2); } Index: src/tests/lib/libc/sys/t_msgrcv.c diff -u src/tests/lib/libc/sys/t_msgrcv.c:1.2 src/tests/lib/libc/sys/t_msgrcv.c:1.3 --- src/tests/lib/libc/sys/t_msgrcv.c:1.2 Fri Nov 11 05:06:01 2011 +++ src/tests/lib/libc/sys/t_msgrcv.c Wed Jul 24 11:44:10 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: t_msgrcv.c,v 1.2 2011/11/11 05:06:01 jruoho Exp $ */ +/* $NetBSD: t_msgrcv.c,v 1.3 2013/07/24 11:44:10 skrll Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__RCSID($NetBSD: t_msgrcv.c,v 1.2 2011/11/11 05:06:01 jruoho Exp $); +__RCSID($NetBSD: t_msgrcv.c,v 1.3 2013/07/24 11:44:10 skrll Exp $); #include sys/msg.h #include sys/stat.h @@ -51,10 +51,11 @@ __RCSID($NetBSD: t_msgrcv.c,v 1.2 2011/ #define MSG_MTYPE_1 0x41 #define MSG_MTYPE_2 0x42 #define MSG_MTYPE_3 0x43 +#define MSG_LEN 3 struct msg { long mtype; - char buf[3]; + char buf[MSG_LEN]; }; static void clean(void); @@ -83,8 +84,8 @@ ATF_TC_BODY(msgrcv_basic, tc) id = msgget(MSG_KEY, IPC_CREAT | 0600); ATF_REQUIRE(id != -1); - (void)msgsnd(id, msg1, sizeof(struct msg), IPC_NOWAIT); - (void)msgrcv(id, msg2, sizeof(struct msg), MSG_MTYPE_1, IPC_NOWAIT); + (void)msgsnd(id, msg1, MSG_LEN, IPC_NOWAIT); + (void)msgrcv(id, msg2, MSG_LEN, MSG_MTYPE_1, IPC_NOWAIT); ATF_CHECK(msg1.buf[0] == msg2.buf[0]); ATF_CHECK(msg1.buf[1] == msg2.buf[1]); @@ -118,7 +119,7 @@ ATF_TC_BODY(msgrcv_block, tc) if (pid == 0) { - if (msgrcv(id, msg, sizeof(struct msg), MSG_MTYPE_1, 0) 0) + if (msgrcv(id, msg, MSG_LEN, MSG_MTYPE_1, 0) 0) _exit(EXIT_FAILURE); _exit(EXIT_SUCCESS); @@ -129,7 +130,7 @@ ATF_TC_BODY(msgrcv_block, tc) * and hence kill(2) should fail with ESRCH. */ (void)sleep(1); - (void)msgsnd(id, msg, sizeof(struct msg), IPC_NOWAIT); + (void)msgsnd(id, msg, MSG_LEN, IPC_NOWAIT); (void)sleep(1); (void)kill(pid, SIGKILL); (void)wait(sta); @@ -162,31 +163,31 @@ ATF_TC_BODY(msgrcv_err,
CVS commit: src
Module Name:src Committed By: skrll Date: Wed Jul 24 11:45:48 UTC 2013 Modified Files: src/doc: HACKS src/tests/lib/libc/sys: Makefile Log Message: There wasn't a codegen bug - the test program itself was buggy. Nothing to see hear... move along. To generate a diff of this commit: cvs rdiff -u -r1.133 -r1.134 src/doc/HACKS cvs rdiff -u -r1.33 -r1.34 src/tests/lib/libc/sys/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/HACKS diff -u src/doc/HACKS:1.133 src/doc/HACKS:1.134 --- src/doc/HACKS:1.133 Tue Jul 23 14:52:07 2013 +++ src/doc/HACKS Wed Jul 24 11:45:48 2013 @@ -1,4 +1,4 @@ -# $NetBSD: HACKS,v 1.133 2013/07/23 14:52:07 skrll Exp $ +# $NetBSD: HACKS,v 1.134 2013/07/24 11:45:48 skrll Exp $ # # This file is intended to document workarounds for currently unsolved # (mostly) compiler bugs. @@ -807,15 +807,6 @@ port hp700 hack compiler error with gcc 4.5.x cdate Tue Jul 23 07:42:28 BST 2013 who skrll - file src/tests/lib/libc/sys/Makefile: 1.32 - descr - workaround for codegen bug affecting t_msgrcv.c. Callee saved (%r4) - corruption. - kcah - - hack compiler error with gcc 4.5.x - cdate Tue Jul 23 07:42:28 BST 2013 - who skrll file src/sys/lib/libkern/Makefile.libkern: 1.26 descr workaround for unanalysed codegen bug affecting md5c.c. Index: src/tests/lib/libc/sys/Makefile diff -u src/tests/lib/libc/sys/Makefile:1.33 src/tests/lib/libc/sys/Makefile:1.34 --- src/tests/lib/libc/sys/Makefile:1.33 Tue Jul 23 07:04:18 2013 +++ src/tests/lib/libc/sys/Makefile Wed Jul 24 11:45:48 2013 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2013/07/23 07:04:18 skrll Exp $ +# $NetBSD: Makefile,v 1.34 2013/07/24 11:45:48 skrll Exp $ MKMAN= no @@ -75,9 +75,5 @@ LDADD.t_posix_fadvise+= -lrumpvfs -lrump WARNS= 4 -.if ${HAVE_GCC:U} == 45 ${MACHINE_CPU} == hppa -COPTS.t_msgrcv.c += ${${ACTIVE_CC} == gcc :? -O0 :} -.endif - .include bsd.test.mk
CVS commit: src/lib/libc/sys
Module Name:src Committed By: skrll Date: Wed Jul 24 11:54:04 UTC 2013 Modified Files: src/lib/libc/sys: msgrcv.2 msgsnd.2 Log Message: Bump date for previous. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/lib/libc/sys/msgrcv.2 cvs rdiff -u -r1.19 -r1.20 src/lib/libc/sys/msgsnd.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/msgrcv.2 diff -u src/lib/libc/sys/msgrcv.2:1.21 src/lib/libc/sys/msgrcv.2:1.22 --- src/lib/libc/sys/msgrcv.2:1.21 Wed Jul 24 11:42:50 2013 +++ src/lib/libc/sys/msgrcv.2 Wed Jul 24 11:54:04 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: msgrcv.2,v 1.21 2013/07/24 11:42:50 skrll Exp $ +.\ $NetBSD: msgrcv.2,v 1.22 2013/07/24 11:54:04 skrll Exp $ .\ .\ Copyright (c) 1995 Frank van der Linden .\ All rights reserved. @@ -29,7 +29,7 @@ .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ -.Dd January 26, 2009 +.Dd July 24, 2013 .Dt MSGRCV 2 .Os .Sh NAME Index: src/lib/libc/sys/msgsnd.2 diff -u src/lib/libc/sys/msgsnd.2:1.19 src/lib/libc/sys/msgsnd.2:1.20 --- src/lib/libc/sys/msgsnd.2:1.19 Wed Jul 24 11:42:50 2013 +++ src/lib/libc/sys/msgsnd.2 Wed Jul 24 11:54:04 2013 @@ -1,4 +1,4 @@ -.\ $NetBSD: msgsnd.2,v 1.19 2013/07/24 11:42:50 skrll Exp $ +.\ $NetBSD: msgsnd.2,v 1.20 2013/07/24 11:54:04 skrll Exp $ .\ .\ Copyright (c) 1995 Frank van der Linden .\ All rights reserved. @@ -29,7 +29,7 @@ .\ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\ -.Dd April 30, 2010 +.Dd July 24, 2013 .Dt MSGSND 2 .Os .Sh NAME
CVS commit: src/tests/usr.bin/make
Module Name:src Committed By: christos Date: Wed Jul 24 14:03:22 UTC 2013 Modified Files: src/tests/usr.bin/make: d_dotwait.out Log Message: adjust for make(1) printing the nesting level. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/usr.bin/make/d_dotwait.out Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/usr.bin/make/d_dotwait.out diff -u src/tests/usr.bin/make/d_dotwait.out:1.1 src/tests/usr.bin/make/d_dotwait.out:1.2 --- src/tests/usr.bin/make/d_dotwait.out:1.1 Sat Mar 17 12:33:14 2012 +++ src/tests/usr.bin/make/d_dotwait.out Wed Jul 24 10:03:22 2013 @@ -22,8 +22,8 @@ shared.2.1 shared.2.1 shared.2.99 shared.2.99 -make: Graph cycles through `cycle.2.99' -make: Graph cycles through `cycle.2.98' -make: Graph cycles through `cycle.2.97' +make[1]: Graph cycles through `cycle.2.99' +make[1]: Graph cycles through `cycle.2.98' +make[1]: Graph cycles through `cycle.2.97' cycle.1.99 cycle.1.99
CVS commit: src/sys/net
Module Name:src Committed By: kefren Date: Wed Jul 24 15:31:04 UTC 2013 Modified Files: src/sys/net: rtsock.c Log Message: report about route tag in sysctl route walker To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/sys/net/rtsock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/net/rtsock.c diff -u src/sys/net/rtsock.c:1.141 src/sys/net/rtsock.c:1.142 --- src/sys/net/rtsock.c:1.141 Fri Mar 1 18:25:57 2013 +++ src/sys/net/rtsock.c Wed Jul 24 15:31:04 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: rtsock.c,v 1.141 2013/03/01 18:25:57 joerg Exp $ */ +/* $NetBSD: rtsock.c,v 1.142 2013/07/24 15:31:04 kefren Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -61,7 +61,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rtsock.c,v 1.141 2013/03/01 18:25:57 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: rtsock.c,v 1.142 2013/07/24 15:31:04 kefren Exp $); #ifdef _KERNEL_OPT #include opt_inet.h @@ -1029,6 +1029,7 @@ sysctl_dumpentry(struct rtentry *rt, voi info.rti_info[RTAX_DST] = rt_getkey(rt); info.rti_info[RTAX_GATEWAY] = rt-rt_gateway; info.rti_info[RTAX_NETMASK] = rt_mask(rt); + info.rti_info[RTAX_TAG] = rt_gettag(rt); if (rt-rt_ifp) { const struct ifaddr *rtifa; info.rti_info[RTAX_IFP] = rt-rt_ifp-if_dl-ifa_addr;
CVS commit: src/lib/libc/arch/m68k
Module Name:src Committed By: matt Date: Wed Jul 24 15:38:07 UTC 2013 Modified Files: src/lib/libc/arch/m68k: SYS.h src/lib/libc/arch/m68k/sys: brk.S ptrace.S sbrk.S syscall.S Log Message: Only jump to CERROR if carry is set, not clear. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/m68k/SYS.h cvs rdiff -u -r1.17 -r1.18 src/lib/libc/arch/m68k/sys/brk.S cvs rdiff -u -r1.13 -r1.14 src/lib/libc/arch/m68k/sys/ptrace.S cvs rdiff -u -r1.16 -r1.17 src/lib/libc/arch/m68k/sys/sbrk.S cvs rdiff -u -r1.8 -r1.9 src/lib/libc/arch/m68k/sys/syscall.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/arch/m68k/SYS.h diff -u src/lib/libc/arch/m68k/SYS.h:1.17 src/lib/libc/arch/m68k/SYS.h:1.18 --- src/lib/libc/arch/m68k/SYS.h:1.17 Tue Jul 16 22:18:14 2013 +++ src/lib/libc/arch/m68k/SYS.h Wed Jul 24 15:38:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: SYS.h,v 1.17 2013/07/16 22:18:14 matt Exp $ */ +/* $NetBSD: SYS.h,v 1.18 2013/07/24 15:38:07 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -53,7 +53,7 @@ #define _SYSCALL(x,y) \ _SYSCALL_NOERROR(x,y); \ - jcc CERROR + jcs CERROR #define SYSCALL_NOERROR(x) \ _SYSCALL_NOERROR(x,x) Index: src/lib/libc/arch/m68k/sys/brk.S diff -u src/lib/libc/arch/m68k/sys/brk.S:1.17 src/lib/libc/arch/m68k/sys/brk.S:1.18 --- src/lib/libc/arch/m68k/sys/brk.S:1.17 Tue Jul 16 23:00:15 2013 +++ src/lib/libc/arch/m68k/sys/brk.S Wed Jul 24 15:38:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: brk.S,v 1.17 2013/07/16 23:00:15 matt Exp $ */ +/* $NetBSD: brk.S,v 1.18 2013/07/24 15:38:07 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -39,7 +39,7 @@ #if 0 RCSID(from: @(#)brk.s 5.1 (Berkeley) 5/12/90) #else - RCSID($NetBSD: brk.S,v 1.17 2013/07/16 23:00:15 matt Exp $) + RCSID($NetBSD: brk.S,v 1.18 2013/07/24 15:38:07 matt Exp $) #endif #endif /* LIBC_SCCS and not lint */ @@ -71,7 +71,7 @@ ENTRY(_brk) movl %a1,4(%sp) ok: SYSTRAP(break) - jcc CERROR + jcs CERROR #ifdef PIC LEA_LCL(_C_LABEL(__curbrk),%a0) movl %a1,(%a0) Index: src/lib/libc/arch/m68k/sys/ptrace.S diff -u src/lib/libc/arch/m68k/sys/ptrace.S:1.13 src/lib/libc/arch/m68k/sys/ptrace.S:1.14 --- src/lib/libc/arch/m68k/sys/ptrace.S:1.13 Tue Jul 16 23:00:15 2013 +++ src/lib/libc/arch/m68k/sys/ptrace.S Wed Jul 24 15:38:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ptrace.S,v 1.13 2013/07/16 23:00:15 matt Exp $ */ +/* $NetBSD: ptrace.S,v 1.14 2013/07/24 15:38:07 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -39,7 +39,7 @@ #if 0 RCSID(from: @(#)ptrace.s 5.1 (Berkeley) 5/12/90) #else - RCSID($NetBSD: ptrace.S,v 1.13 2013/07/16 23:00:15 matt Exp $) + RCSID($NetBSD: ptrace.S,v 1.14 2013/07/24 15:38:07 matt Exp $) #endif #endif /* LIBC_SCCS and not lint */ @@ -66,6 +66,6 @@ ENTRY(ptrace) #endif /* PIC */ #endif /* _REENTRANT */ SYSTRAP(ptrace) - jcc CERROR + jcs CERROR rts END(ptrace) Index: src/lib/libc/arch/m68k/sys/sbrk.S diff -u src/lib/libc/arch/m68k/sys/sbrk.S:1.16 src/lib/libc/arch/m68k/sys/sbrk.S:1.17 --- src/lib/libc/arch/m68k/sys/sbrk.S:1.16 Tue Jul 16 23:00:15 2013 +++ src/lib/libc/arch/m68k/sys/sbrk.S Wed Jul 24 15:38:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sbrk.S,v 1.16 2013/07/16 23:00:15 matt Exp $ */ +/* $NetBSD: sbrk.S,v 1.17 2013/07/24 15:38:07 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -39,7 +39,7 @@ #if 0 RCSID(from: @(#)sbrk.s 5.1 (Berkeley) 5/12/90) #else - RCSID($NetBSD: sbrk.S,v 1.16 2013/07/16 23:00:15 matt Exp $) + RCSID($NetBSD: sbrk.S,v 1.17 2013/07/24 15:38:07 matt Exp $) #endif #endif /* LIBC_SCCS and not lint */ @@ -62,7 +62,7 @@ ENTRY(_sbrk) movl (%a1),%d0 addl %d0,4(%sp) SYSTRAP(break) - jcc CERROR + jcs CERROR movl (%a1),%d0 movl 4(%sp),(%a1) #ifdef __SVR4_ABI__ Index: src/lib/libc/arch/m68k/sys/syscall.S diff -u src/lib/libc/arch/m68k/sys/syscall.S:1.8 src/lib/libc/arch/m68k/sys/syscall.S:1.9 --- src/lib/libc/arch/m68k/sys/syscall.S:1.8 Tue Jul 16 22:20:35 2013 +++ src/lib/libc/arch/m68k/sys/syscall.S Wed Jul 24 15:38:07 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: syscall.S,v 1.8 2013/07/16 22:20:35 matt Exp $ */ +/* $NetBSD: syscall.S,v 1.9 2013/07/24 15:38:07 matt Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -39,13 +39,13 @@ #if 0 RCSID(from: @(#)syscall.s 5.1 (Berkeley) 5/12/90) #else - RCSID($NetBSD: syscall.S,v 1.8 2013/07/16 22:20:35 matt Exp $) + RCSID($NetBSD: syscall.S,v 1.9 2013/07/24 15:38:07 matt Exp $) #endif #endif /* LIBC_SCCS and not lint */ ENTRY(syscall) clrl %d0 trap #0 - jcc CERROR + jcs CERROR rts END(syscall)
CVS commit: src/sys/dev/ic
Module Name:src Committed By: msaitoh Date: Thu Jul 25 04:21:47 UTC 2013 Modified Files: src/sys/dev/ic: mm58167.c Log Message: Clear memory as intended. Fixes PR#46372. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/mm58167.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/mm58167.c diff -u src/sys/dev/ic/mm58167.c:1.14 src/sys/dev/ic/mm58167.c:1.15 --- src/sys/dev/ic/mm58167.c:1.14 Sat Dec 12 16:12:05 2009 +++ src/sys/dev/ic/mm58167.c Thu Jul 25 04:21:47 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: mm58167.c,v 1.14 2009/12/12 16:12:05 tsutsui Exp $ */ +/* $NetBSD: mm58167.c,v 1.15 2013/07/25 04:21:47 msaitoh Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mm58167.c,v 1.14 2009/12/12 16:12:05 tsutsui Exp $); +__KERNEL_RCSID(0, $NetBSD: mm58167.c,v 1.15 2013/07/25 04:21:47 msaitoh Exp $); #include sys/param.h #include sys/malloc.h @@ -68,7 +68,7 @@ mm58167_attach(struct mm58167_softc *sc) aprint_normal(: mm58167); handle = sc-_mm58167_todr_handle; - memset(handle, 0, sizeof(handle)); + memset(handle, 0, sizeof(*handle)); handle-cookie = sc; handle-todr_gettime_ymdhms = mm58167_gettime_ymdhms; handle-todr_settime_ymdhms = mm58167_settime_ymdhms;
CVS commit: src/sys/dev/dmover
Module Name:src Committed By: msaitoh Date: Thu Jul 25 04:32:37 UTC 2013 Modified Files: src/sys/dev/dmover: dmover_io.c Log Message: Clear struct stat correctly. Fixes PR#46373. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/dev/dmover/dmover_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/dmover/dmover_io.c diff -u src/sys/dev/dmover/dmover_io.c:1.40 src/sys/dev/dmover/dmover_io.c:1.41 --- src/sys/dev/dmover/dmover_io.c:1.40 Sat May 14 13:52:00 2011 +++ src/sys/dev/dmover/dmover_io.c Thu Jul 25 04:32:37 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dmover_io.c,v 1.40 2011/05/14 13:52:00 jakllsch Exp $ */ +/* $NetBSD: dmover_io.c,v 1.41 2013/07/25 04:32:37 msaitoh Exp $ */ /* * Copyright (c) 2002, 2003 Wasabi Systems, Inc. @@ -55,7 +55,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dmover_io.c,v 1.40 2011/05/14 13:52:00 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: dmover_io.c,v 1.41 2013/07/25 04:32:37 msaitoh Exp $); #include sys/param.h #include sys/queue.h @@ -595,7 +595,7 @@ dmio_stat(struct file *fp, struct stat * { struct dmio_state *ds = fp-f_data; - (void)memset(st, 0, sizeof(st)); + (void)memset(st, 0, sizeof(*st)); KERNEL_LOCK(1, NULL); st-st_dev = makedev(cdevsw_lookup_major(dmoverio_cdevsw), 0); st-st_atimespec = ds-ds_atime;