--- upstream/dynamips-0.2.6-RC5/net_io.c 2007/10/06 16:09:07 6 +++ upstream/dynamips-0.2.7-RC1/net_io.c 2007/10/06 16:23:47 7 @@ -1,5 +1,5 @@ /* - * Cisco 7200 (Predator) simulation platform. + * Cisco router) simulation platform. * Copyright (c) 2005,2006 Christophe Fillot (cf@utc.fr) * * Network Input/Output Abstraction Layer. @@ -206,6 +206,14 @@ return(-1); } + /* Apply the bidirectional filter */ + if (nio->both_filter != NULL) { + res = nio->both_filter->pkt_handler(nio,pkt,len,nio->both_filter_data); + + if (res == NETIO_FILTER_ACTION_DROP) + return(-1); + } + return(nio->send(nio->dptr,pkt,len)); } @@ -235,6 +243,14 @@ return(-1); } + /* Apply the bidirectional filter */ + if (nio->both_filter != NULL) { + res = nio->both_filter->pkt_handler(nio,pkt,len,nio->both_filter_data); + + if (res == NETIO_FILTER_ACTION_DROP) + return(-1); + } + return(len); } @@ -1327,6 +1343,7 @@ if (nio) { netio_filter_unbind(nio,NETIO_FILTER_DIR_RX); netio_filter_unbind(nio,NETIO_FILTER_DIR_TX); + netio_filter_unbind(nio,NETIO_FILTER_DIR_BOTH); switch(nio->type) { case NETIO_TYPE_UNIX: