default_CONFIG = CONFIG_FWP=y
ifeq ($(CONFIG_FWP),y)
-SUBDIRS = lib mngr wme_test
+SUBDIRS = lib mngr wme_test tests
CFLAGS+= -Wall -Wextra -D_REENTRANT
endif
return FRSH_ERR_ALREADY_BOUND;
ep->vres = vres;
- rv = fwp_vres_bind(vres, ep, ep->sockd);
+ rv = fwp_vres_bind(vres, ep, ep->sockd, &ep->src);
return rv;
}
static int apply_params(fwp_vres_t *vres)
{
- int rv;
+ int rv = 0;
vres->period = vres->params.period;
vres->budget = vres->params.budget;
set_flag(vres, UNTOUCHED);
}
/*int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *epoint)*/
-int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd)
+int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd, struct in_addr *src)
{
int rv = 0;
}
vres->ac_sockd = sockd;
+ *src = vres->params.src;
rv = fwp_vres_set_ac(vres->ac_sockd, vres->params.ac_id);
if (rv)
goto err;
struct fwp_endpoint;
int fwp_vres_enqueue(struct fwp_vres *vres, struct fwp_endpoint *ep,
const void *msg, size_t size);
-int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd);
+int fwp_vres_bind(fwp_vres_t *vres, struct fwp_endpoint *ep, int sockd, struct in_addr *src);
int fwp_vres_unbind(fwp_vres_t *vres);
extern fwp_vres_params_t fwp_vres_params_default;