/*
* Encrypting tunnel for userv-ipif tunnels, actual implementation
- *
+ */
+/*
* usage:
* udptunnel-forwarder <optchars>
* <public-local-fd> <private-in-fd> <private-out-fd>
* 12 usage error
* 16 bad trouble
*/
+/*
+ * Copyright (C) 2000 Ian Jackson
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with userv-utils; if not, write to the Free Software
+ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
#include <sys/socket.h>
#include <netinet/in.h>
for (i=n_mechs-1; i>=0; i--) {
emsg= mechs[i]->decode(md_in[i],&buf_in);
if (emsg) {
- fprintf(stderr, "%s: bad packet: %s: %s\n", programid, mechs[i]->name, emsg);
+ if (*emsg)
+ fprintf(stderr, "%s: bad packet: %s: %s\n",
+ programid, mechs[i]->name, emsg);
+ else
+ cdebug(i,"silently discarded");
return;
}
cdebugbuf(i, "decode", &buf_in, 3,0);