You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2020/03/06 19:17:53 UTC
[GitHub] [qpid-dispatch] ChugR opened a new pull request #698: DISPATCH-975:
Enforce max message size on message ingress
ChugR opened a new pull request #698: DISPATCH-975: Enforce max message size on message ingress
URL: https://github.com/apache/qpid-dispatch/pull/698
This commit has an updated implementation for final review.
MaxMessageSize may be specified globally, per vhost, or per vhost user
group. The global setting applies to all vhosts for which maxMessageSize
is unspecified. The vhost setting applies to all vhost user groups for
which maxMessageSize is unspecified. The vhost user group setting
overrides all other settings. A maxMessageSize setting of zero disables
maxMessageSize enforcement.
Links over which maxMessageSize is being enforced will advertise the
size in the _max-message-size_ field of the Attach
frame. Qpid-dispatch ignores the _max-message-size_ field received in
incoming Attach frames.
Message size for maxMessageSize purposes is calculated to be the
number of AMQP octets in the Annotated Message. This includes the
header, delivery-annotations, message-annotations, properties,
application-properties, application-data, and footer
sections. Administrators and users must be aware that a "message"
consisting a single character string (the application-data) will be
much larger over the wire after properties and annotations have been
inserted.
Max message size is enforced on message/transfer ingress only. Once a
message has entered the router network it is free to go to any
destination.
When a message exceeds max size then:
* Disposition of _rejected_ is returned to the sender for that delivery.
* Copies of the message being delivered through the router network are aborted.
* Previous versions of this patch closed the sender's ingress link
with an error. This ensured that a sender would know that the
message did not get through and would clearly know why. However,
spontaneous link closures cause a wide variety of serious problems
for many clients. Link closure should not be enforced until, at a
minimum, qpid-proton clients handle the closure cleanly.
Self test includes a four-router linear network with two interior and two
edge routers. Tests try oversize messages with a variety of sender and
receiver attachment points in that network.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] codecov-io commented on issue #698: DISPATCH-975:
Enforce max message size on message ingress
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #698: DISPATCH-975: Enforce max message size on message ingress
URL: https://github.com/apache/qpid-dispatch/pull/698#issuecomment-595951599
# [Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/698?src=pr&el=h1) Report
> Merging [#698](https://codecov.io/gh/apache/qpid-dispatch/pull/698?src=pr&el=desc) into [master](https://codecov.io/gh/apache/qpid-dispatch/commit/6d7b4219055da30404a0ebbaddb350febb0275b0?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `100%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/qpid-dispatch/pull/698/graphs/tree.svg?width=650&token=rk2Cgd27pP&height=150&src=pr)](https://codecov.io/gh/apache/qpid-dispatch/pull/698?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #698 +/- ##
==========================================
- Coverage 86.89% 86.86% -0.03%
==========================================
Files 93 93
Lines 21208 21248 +40
==========================================
+ Hits 18429 18458 +29
- Misses 2779 2790 +11
```
| [Impacted Files](https://codecov.io/gh/apache/qpid-dispatch/pull/698?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [src/router\_node.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9ub2RlLmM=) | `93.24% <100%> (+0.14%)` | :arrow_up: |
| [src/policy.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL3BvbGljeS5j) | `87.36% <100%> (+0.28%)` | :arrow_up: |
| [src/server.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL3NlcnZlci5j) | `86.82% <100%> (+0.14%)` | :arrow_up: |
| [src/container.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL2NvbnRhaW5lci5j) | `82.23% <100%> (-0.13%)` | :arrow_down: |
| [src/message.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL21lc3NhZ2UuYw==) | `91.44% <100%> (+0.53%)` | :arrow_up: |
| [src/router\_core/router\_core.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9jb3JlL3JvdXRlcl9jb3JlLmM=) | `84.73% <0%> (-1.77%)` | :arrow_down: |
| [src/router\_core/forwarder.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9jb3JlL2ZvcndhcmRlci5j) | `94.02% <0%> (-1.15%)` | :arrow_down: |
| [src/router\_core/delivery.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL3JvdXRlcl9jb3JlL2RlbGl2ZXJ5LmM=) | `89.66% <0%> (-0.57%)` | :arrow_down: |
| [src/parse.c](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree#diff-c3JjL3BhcnNlLmM=) | `88.02% <0%> (-0.23%)` | :arrow_down: |
| ... and [6 more](https://codecov.io/gh/apache/qpid-dispatch/pull/698/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/698?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/qpid-dispatch/pull/698?src=pr&el=footer). Last update [6d7b421...f388471](https://codecov.io/gh/apache/qpid-dispatch/pull/698?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] kgiusti commented on a change in pull request #698:
DISPATCH-975: Enforce max message size on message ingress
Posted by GitBox <gi...@apache.org>.
kgiusti commented on a change in pull request #698: DISPATCH-975: Enforce max message size on message ingress
URL: https://github.com/apache/qpid-dispatch/pull/698#discussion_r389804469
##########
File path: src/router_node.c
##########
@@ -1884,3 +1885,12 @@ void qd_link_restart_rx(qd_link_t *in_link)
qd_connection_invoke_deferred(in_conn, deferred_AMQP_rx_handler, safe_ptr);
}
}
+
+
+// prepend formatted connection and link info to policy denial text and log it
+void qd_connection_log_policy_denial(qd_link_t *link, const char *text)
+{
+ qdr_link_t *rlink = (qdr_link_t*) qd_link_get_context(link);
Review comment:
The qdr_link_t has a separate lifecycle from the qd_link_t. IOW you'll want to check that rlink is not null here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ChugR commented on issue #698: DISPATCH-975:
Enforce max message size on message ingress
Posted by GitBox <gi...@apache.org>.
ChugR commented on issue #698: DISPATCH-975: Enforce max message size on message ingress
URL: https://github.com/apache/qpid-dispatch/pull/698#issuecomment-598736221
Closing this PR. Upcoming replacement includes review comment fixes, improved testing, and a rebase to latest master.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org
[GitHub] [qpid-dispatch] ChugR closed pull request #698: DISPATCH-975:
Enforce max message size on message ingress
Posted by GitBox <gi...@apache.org>.
ChugR closed pull request #698: DISPATCH-975: Enforce max message size on message ingress
URL: https://github.com/apache/qpid-dispatch/pull/698
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org