route6d.c (119037) | route6d.c (119038) |
---|---|
1/* $FreeBSD: head/usr.sbin/route6d/route6d.c 119037 2003-08-17 17:29:54Z ume $ */ | 1/* $FreeBSD: head/usr.sbin/route6d/route6d.c 119038 2003-08-17 17:34:09Z ume $ */ |
2/* $KAME: route6d.c,v 1.64 2001/05/08 04:36:37 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 2994 unchanged lines hidden (view full) --- 3004 for (i = 0; i < nfilter; i++) { 3005 ap = filter[i]; 3006 iflp = NULL; 3007 ifcp = NULL; 3008 if (filtertype[i] == 'N' || filtertype[i] == 'T') { 3009 iflp = ap; 3010 goto ifonly; 3011 } | 2/* $KAME: route6d.c,v 1.64 2001/05/08 04:36:37 itojun Exp $ */ 3 4/* 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 2994 unchanged lines hidden (view full) --- 3004 for (i = 0; i < nfilter; i++) { 3005 ap = filter[i]; 3006 iflp = NULL; 3007 ifcp = NULL; 3008 if (filtertype[i] == 'N' || filtertype[i] == 'T') { 3009 iflp = ap; 3010 goto ifonly; 3011 } |
3012 if ((p = index(ap, ',')) != NULL) { | 3012 if ((p = strchr(ap, ',')) != NULL) { |
3013 *p++ = '\0'; 3014 iflp = p; 3015 } | 3013 *p++ = '\0'; 3014 iflp = p; 3015 } |
3016 if ((p = index(ap, '/')) == NULL) { | 3016 if ((p = strchr(ap, '/')) == NULL) { |
3017 fatal("no prefixlen specified for '%s'", ap); 3018 /*NOTREACHED*/ 3019 } 3020 *p++ = '\0'; 3021 if (inet_pton(AF_INET6, ap, &ftmp.iff_addr) != 1) { 3022 fatal("invalid prefix specified for '%s'", ap); 3023 /*NOTREACHED*/ 3024 } --- 4 unchanged lines hidden (view full) --- 3029 ftmp.iff_type = filtertype[i]; 3030 if (iflp == NULL || *iflp == '\0') { 3031 fatal("no interface specified for '%s'", ap); 3032 /*NOTREACHED*/ 3033 } 3034 /* parse the interface listing portion */ 3035 while (iflp) { 3036 ifname = iflp; | 3017 fatal("no prefixlen specified for '%s'", ap); 3018 /*NOTREACHED*/ 3019 } 3020 *p++ = '\0'; 3021 if (inet_pton(AF_INET6, ap, &ftmp.iff_addr) != 1) { 3022 fatal("invalid prefix specified for '%s'", ap); 3023 /*NOTREACHED*/ 3024 } --- 4 unchanged lines hidden (view full) --- 3029 ftmp.iff_type = filtertype[i]; 3030 if (iflp == NULL || *iflp == '\0') { 3031 fatal("no interface specified for '%s'", ap); 3032 /*NOTREACHED*/ 3033 } 3034 /* parse the interface listing portion */ 3035 while (iflp) { 3036 ifname = iflp; |
3037 if ((iflp = index(iflp, ',')) != NULL) | 3037 if ((iflp = strchr(iflp, ',')) != NULL) |
3038 *iflp++ = '\0'; 3039 ifcp = ifc_find(ifname); 3040 if (ifcp == NULL) { 3041 fatal("no interface %s exists", ifname); 3042 /*NOTREACHED*/ 3043 } 3044 iff_obj = (struct iff *)malloc(sizeof(struct iff)); 3045 if (iff_obj == NULL) { --- 424 unchanged lines hidden --- | 3038 *iflp++ = '\0'; 3039 ifcp = ifc_find(ifname); 3040 if (ifcp == NULL) { 3041 fatal("no interface %s exists", ifname); 3042 /*NOTREACHED*/ 3043 } 3044 iff_obj = (struct iff *)malloc(sizeof(struct iff)); 3045 if (iff_obj == NULL) { --- 424 unchanged lines hidden --- |