Update of /cvsroot/netadm/gwc/gwclib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14271/gwclib
Modified Files:
confproc.c
Log Message:
ADD: anyTCP, anyUDP, ICMP
Index: confproc.c
===================================================================
RCS file: /cvsroot/netadm/gwc/gwclib/confproc.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** confproc.c 13 Mar 2006 14:15:05 -0000 1.19
--- confproc.c 14 Mar 2006 17:17:05 -0000 1.20
***************
*** 2103,2108 ****
}
else if (svc->proto == SYS_PROTO_ICMP) {
! if ((svc->u.icmptype = mapstrtoid(map_icmptype, argv[2])) == -1)
frerrmap(fr, RET_EUSAGE, "ICMP type", map_icmptype);
--- 2103,2110 ----
}
else if (svc->proto == SYS_PROTO_ICMP) {
+ if (!strcmp(argv[0], "ICMP"))
+ svc->u.icmptype = atoi (argv[2]);
! else if ((svc->u.icmptype = mapstrtoid(map_icmptype, argv[2])) == -1)
frerrmap(fr, RET_EUSAGE, "ICMP type", map_icmptype);
***************
*** 2177,2180 ****
--- 2179,2193 ----
if (argc == 1) {
+
+ if (!strcmp(argv[0], "anyTCP") || !strcmp(argv[0], "anyUDP") ||
+ !strcmp (argv[0], "ICMP"))
+ {
+
+ frerr(fr, RET_EINTERNAL,
+ "[FC/Service name] \"%s\" cannot be deleted\n", argv[0]);
+ return;
+
+ }
+
for (i = 0; i < csm->fc_svc_cnt; i++) {
if (!strcmp(csm->fc_svc[i].name, argv[0])) {
|