Actually use gen_prep() and gen_check(), instead of udp_prep() and
udp_check(), for unknown protocols.
This commit is contained in:
parent
31352a12bf
commit
dbee325068
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=100533
@ -487,11 +487,11 @@ main(int argc, char **argv)
|
||||
case 'P':
|
||||
for (i = 0; protos[i].name != NULL; i++) {
|
||||
if (strcasecmp(protos[i].name, optarg) == 0) {
|
||||
proto = &protos[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (protos[i].name == NULL) { /* generic handler */
|
||||
proto = &protos[i];
|
||||
if (proto->name == NULL) { /* generic handler */
|
||||
struct protoent *pe;
|
||||
u_long pnum;
|
||||
char *eptr;
|
||||
@ -1122,7 +1122,7 @@ gre_check(const u_char *data, int seq)
|
||||
void
|
||||
gen_prep(struct outdata *outdata)
|
||||
{
|
||||
u_int16_t *const ptr;
|
||||
u_int16_t *const ptr = (u_int16_t *) outprot;
|
||||
|
||||
ptr[0] = htons(ident);
|
||||
ptr[1] = htons(port + outdata->seq);
|
||||
|
Loading…
Reference in New Issue
Block a user