Do not respond to an ignored SPDP message
Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
parent
be7f7af741
commit
a292e800ac
3 changed files with 32 additions and 42 deletions
|
@ -695,7 +695,7 @@ int writer_set_notalive (struct writer *wr, bool notify);
|
||||||
/* Set when this proxy participant is not to be announced on the built-in topics yet */
|
/* Set when this proxy participant is not to be announced on the built-in topics yet */
|
||||||
#define CF_PROXYPP_NO_SPDP (1 << 2)
|
#define CF_PROXYPP_NO_SPDP (1 << 2)
|
||||||
|
|
||||||
void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const struct ddsi_plist *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, ddsrt_wctime_t timestamp, seqno_t seq);
|
bool new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const struct ddsi_plist *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, ddsrt_wctime_t timestamp, seqno_t seq);
|
||||||
DDS_EXPORT int delete_proxy_participant_by_guid (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, ddsrt_wctime_t timestamp, int isimplicit);
|
DDS_EXPORT int delete_proxy_participant_by_guid (struct ddsi_domaingv *gv, const struct ddsi_guid *guid, ddsrt_wctime_t timestamp, int isimplicit);
|
||||||
|
|
||||||
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct ddsi_plist *datap, ddsrt_wctime_t timestamp);
|
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct ddsi_plist *datap, ddsrt_wctime_t timestamp);
|
||||||
|
|
|
@ -764,28 +764,17 @@ static int handle_SPDP_alive (const struct receiver_state *rst, seqno_t seq, dds
|
||||||
|
|
||||||
maybe_add_pp_as_meta_to_as_disc (gv, as_meta);
|
maybe_add_pp_as_meta_to_as_disc (gv, as_meta);
|
||||||
|
|
||||||
new_proxy_participant
|
if (!new_proxy_participant (gv, &datap->participant_guid, builtin_endpoint_set, &privileged_pp_guid, as_default, as_meta, datap, lease_duration, rst->vendor, custom_flags, timestamp, seq))
|
||||||
(
|
{
|
||||||
gv,
|
/* If no proxy participant was created, don't respond */
|
||||||
&datap->participant_guid,
|
return 0;
|
||||||
builtin_endpoint_set,
|
}
|
||||||
&privileged_pp_guid,
|
else
|
||||||
as_default,
|
{
|
||||||
as_meta,
|
|
||||||
datap,
|
|
||||||
lease_duration,
|
|
||||||
rst->vendor,
|
|
||||||
custom_flags,
|
|
||||||
timestamp,
|
|
||||||
seq
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Force transmission of SPDP messages - we're not very careful
|
/* Force transmission of SPDP messages - we're not very careful
|
||||||
in avoiding the processing of SPDP packets addressed to others
|
in avoiding the processing of SPDP packets addressed to others
|
||||||
so filter here */
|
so filter here */
|
||||||
{
|
int have_dst = (rst->dst_guid_prefix.u[0] != 0 || rst->dst_guid_prefix.u[1] != 0 || rst->dst_guid_prefix.u[2] != 0);
|
||||||
int have_dst =
|
|
||||||
(rst->dst_guid_prefix.u[0] != 0 || rst->dst_guid_prefix.u[1] != 0 || rst->dst_guid_prefix.u[2] != 0);
|
|
||||||
if (!have_dst)
|
if (!have_dst)
|
||||||
{
|
{
|
||||||
GVLOGDISC ("broadcasted SPDP packet -> answering");
|
GVLOGDISC ("broadcasted SPDP packet -> answering");
|
||||||
|
@ -795,7 +784,6 @@ static int handle_SPDP_alive (const struct receiver_state *rst, seqno_t seq, dds
|
||||||
{
|
{
|
||||||
GVLOGDISC ("directed SPDP packet -> not responding\n");
|
GVLOGDISC ("directed SPDP packet -> not responding\n");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (custom_flags & CF_PARTICIPANT_IS_DDSI2)
|
if (custom_flags & CF_PARTICIPANT_IS_DDSI2)
|
||||||
{
|
{
|
||||||
|
@ -816,6 +804,7 @@ static int handle_SPDP_alive (const struct receiver_state *rst, seqno_t seq, dds
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handle_SPDP (const struct receiver_state *rst, ddsi_entityid_t pwr_entityid, seqno_t seq, const struct ddsi_serdata *serdata)
|
static void handle_SPDP (const struct receiver_state *rst, ddsi_entityid_t pwr_entityid, seqno_t seq, const struct ddsi_serdata *serdata)
|
||||||
|
@ -1102,7 +1091,7 @@ static struct proxy_participant *implicitly_create_proxypp (struct ddsi_domaingv
|
||||||
doing anything about (1). That means we fall back to the legacy mode of locally generating
|
doing anything about (1). That means we fall back to the legacy mode of locally generating
|
||||||
GIDs but leaving the system id unchanged if the remote is OSPL. */
|
GIDs but leaving the system id unchanged if the remote is OSPL. */
|
||||||
actual_vendorid = (datap->present & PP_VENDORID) ? datap->vendorid : vendorid;
|
actual_vendorid = (datap->present & PP_VENDORID) ? datap->vendorid : vendorid;
|
||||||
new_proxy_participant(gv, ppguid, 0, &privguid, new_addrset(), new_addrset(), &pp_plist, DDS_INFINITY, actual_vendorid, CF_IMPLICITLY_CREATED_PROXYPP, timestamp, seq);
|
(void) new_proxy_participant(gv, ppguid, 0, &privguid, new_addrset(), new_addrset(), &pp_plist, DDS_INFINITY, actual_vendorid, CF_IMPLICITLY_CREATED_PROXYPP, timestamp, seq);
|
||||||
}
|
}
|
||||||
else if (ppguid->prefix.u[0] == src_guid_prefix->u[0] && vendor_is_eclipse_or_opensplice (vendorid))
|
else if (ppguid->prefix.u[0] == src_guid_prefix->u[0] && vendor_is_eclipse_or_opensplice (vendorid))
|
||||||
{
|
{
|
||||||
|
|
|
@ -4872,7 +4872,7 @@ static void free_proxy_participant(struct proxy_participant *proxypp)
|
||||||
ddsrt_free (proxypp);
|
ddsrt_free (proxypp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const ddsi_plist_t *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, ddsrt_wctime_t timestamp, seqno_t seq)
|
bool new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *ppguid, uint32_t bes, const struct ddsi_guid *privileged_pp_guid, struct addrset *as_default, struct addrset *as_meta, const ddsi_plist_t *plist, dds_duration_t tlease_dur, nn_vendorid_t vendor, unsigned custom_flags, ddsrt_wctime_t timestamp, seqno_t seq)
|
||||||
{
|
{
|
||||||
/* No locking => iff all participants use unique guids, and sedp
|
/* No locking => iff all participants use unique guids, and sedp
|
||||||
runs on a single thread, it can't go wrong. FIXME, maybe? The
|
runs on a single thread, it can't go wrong. FIXME, maybe? The
|
||||||
|
@ -4978,7 +4978,7 @@ void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *pp
|
||||||
{
|
{
|
||||||
GVWARNING ("Remote secure participant "PGUIDFMT" not allowed\n", PGUID (*ppguid));
|
GVWARNING ("Remote secure participant "PGUIDFMT" not allowed\n", PGUID (*ppguid));
|
||||||
free_proxy_participant (proxypp);
|
free_proxy_participant (proxypp);
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -5004,6 +5004,7 @@ void new_proxy_participant (struct ddsi_domaingv *gv, const struct ddsi_guid *pp
|
||||||
proxy_participant_create_handshakes (gv, proxypp);
|
proxy_participant_create_handshakes (gv, proxypp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct ddsi_plist *datap, ddsrt_wctime_t timestamp)
|
int update_proxy_participant_plist_locked (struct proxy_participant *proxypp, seqno_t seq, const struct ddsi_plist *datap, ddsrt_wctime_t timestamp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue